I am using WinPython-32bit-3.3.5.0.
With PIL's Image.save, the compression method "tiff_lzw"
leaves the file uncompressed.
However, I found out:
The function _save
in Pillow's tiffimageplugin.py
has a list of libtiff-supported compression methods. When I add "tiff_lzw"
there (or set WRITE_LIBTIFF = True
), the saved image is successfully LZW-compressed!
Maybe Pillow has not included "tiff_lzw" in this list because libtiff is not always compiled with LZW support?
I have now found out that I can set
TiffImagePlugin.WRITE_LIBTIFF = True
in my code, so this ticket can be closed.Last edit: Robert Pollak 2014-05-13
Note that currently setting 'WRITE_LIBTIFF = True' disables custom TIFF tags.