GreycLab / CImg

The CImg Library is a small and open-source C++ toolkit for image processing
http://cimg.eu
Other
1.48k stars 282 forks source link

save tiff files using ZIP compression #350

Open Magallo opened 2 years ago

Magallo commented 2 years ago

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!

dtschump commented 2 years ago

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

0xC0000054 commented 2 years ago

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.