fcl-image: write tif: use compression number DeflateAdobe, not obsolete DeflateZLib

git-svn-id: trunk@42586 -
This commit is contained in:
Mattias Gaertner 2019-08-05 16:54:17 +00:00
parent c74007b580
commit fb27e7f4c3
2 changed files with 6 additions and 4 deletions

View File

@ -88,7 +88,9 @@ const
TiffCompressionIT8BL = 32898; { IT8BL }
TiffCompressionPixarFilm = 32908; { PIXARFILM }
TiffCompressionPixarLog = 32909; { PIXARLOG }
TiffCompressionDeflateZLib = 32946; { DeflatePKZip }
TiffCompressionDeflateZLib = 32946; { DeflatePKZip - obsolete,
same as TiffCompressionDeflateAdobe,
Macos Finder does not like this, use Adobe instead }
TiffCompressionDCS = 32947; { DCS }
TiffCompressionJBIG = 34661; { JBIG }
TiffCompressionSGILog = 34676; { SGILOG }

View File

@ -464,12 +464,12 @@ begin
Compression:=IFD.Compression;
case Compression of
TiffCompressionNone,
TiffCompressionDeflateZLib: ;
TiffCompressionDeflateAdobe: ;
else
{$ifdef FPC_DEBUG_IMAGE}
writeln('TFPWriterTiff.AddImage unsupported compression '+TiffCompressionName(Compression)+', using deflate instead.');
{$endif}
Compression:=TiffCompressionDeflateZLib;
Compression:=TiffCompressionDeflateAdobe;
end;
if IFD.Orientation in [1..4] then begin
@ -698,7 +698,7 @@ t=',ChunkCount);
// compress
case Compression of
TiffCompressionDeflateZLib: EncodeDeflate(Chunk,ChunkBytes);
TiffCompressionDeflateZLib, TiffCompressionDeflateAdobe: EncodeDeflate(Chunk,ChunkBytes);
end;
ChunkOffsets.Chunks[ChunkIndex].Data:=Chunk;