CImg icon indicating copy to clipboard operation
CImg copied to clipboard

save tiff files using ZIP compression

Open Magallo opened this issue 2 years ago • 2 comments

Hi all, I am using the save_tiff method to save images in tiff format. The compression type parameter specifies if using no compression (value = 0), LZW compression (value = 1) or JPG compression (value = 2). I know tiff images support also zip compression. Is it possibile to specify the ZIP compression in the save_tiff method? Thanks. I appreciate a lot your work!

Magallo avatar Apr 28 '22 08:04 Magallo

According to https://www.awaresystems.be/imaging/tiff/tifftags/compression.html, ZIP compression is not supported in TIFF format.

dtschump avatar Apr 28 '22 08:04 dtschump

TIFF with ZIP compression is an Adobe Photoshop extension to the TIFF format, see Adobe Photoshop TIFF Technical Notes. libtiff supports reading and writing files with ZIP compression, it defines the Photoshop ZIP compression value as COMPRESSION_ADOBE_DEFLATE.

0xC0000054 avatar May 11 '22 20:05 0xC0000054