From bf7c181fe2b7eb6d26cba10d848fbbe763052d66 Mon Sep 17 00:00:00 2001 From: michael Date: Sat, 13 Jul 2019 13:40:09 +0000 Subject: [PATCH] * Merging revisions r42316 from trunk: ------------------------------------------------------------------------ r42316 | mattias | 2019-07-01 16:16:32 +0200 (Mon, 01 Jul 2019) | 1 line fcl-image: fpreadtiff: fixed inline ------------------------------------------------------------------------ git-svn-id: branches/fixes_3_2@42434 - --- packages/fcl-image/src/fpreadtiff.pas | 38 +++++++++++++-------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/packages/fcl-image/src/fpreadtiff.pas b/packages/fcl-image/src/fpreadtiff.pas index 9117313c32..729d7c469e 100644 --- a/packages/fcl-image/src/fpreadtiff.pas +++ b/packages/fcl-image/src/fpreadtiff.pas @@ -161,6 +161,23 @@ begin Result := FPColor(R and $ffff,G and $ffff,B and $ffff); end ; +function TFPReaderTiff.FixEndian(w: Word): Word; inline; +begin + Result:=w; + if FReverseEndian then + Result:=((Result and $ff) shl 8) or (Result shr 8); +end; + +function TFPReaderTiff.FixEndian(d: DWord): DWord; inline; +begin + Result:=d; + if FReverseEndian then + Result:=((Result and $ff) shl 24) + or ((Result and $ff00) shl 8) + or ((Result and $ff0000) shr 8) + or (Result shr 24); +end; + procedure TFPReaderTiff.TiffError(Msg: string); begin Msg:=Msg+' at position '+IntToStr(s.Position); @@ -1796,7 +1813,7 @@ begin ChunkCount := TilesAcross * TilesDown; ReadShortOrLongValues(IFD.TileOffsets,ChunkOffsets,CurCount); if CurCount