You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First, there are two flags, READ_LIBTIFF and WRITE_LIBTIFF, which are (currently) only used for testing. Setting READ_LIBTIFF before a write is a noop.
Second, it may be a bug that we're not setting tiff_lzw to use libtiff by default. There is LZW and packbits support in old PIL code, but IIRC, it's somewhat broken. (It my be broken by not being called, testing is required ).
Third, the changes in Pillow postdate that question about PIL by a good 3 years, and the libtiff support was only merged last year.
Sorry, of course I meant WRITE_LIBTIFF. That's what I currently use to activate LZW compression.
When I do not set it, I get an uncompressed file with a compression tag value of COMPRESSION_LZW.
So I think this line should have "tiff_lzw" added.
Activity
wiredfool commentedon May 13, 2014
Actually, that's ... not quite right.
First, there are two flags, READ_LIBTIFF and WRITE_LIBTIFF, which are (currently) only used for testing. Setting READ_LIBTIFF before a write is a noop.
Second, it may be a bug that we're not setting tiff_lzw to use libtiff by default. There is LZW and packbits support in old PIL code, but IIRC, it's somewhat broken. (It my be broken by not being called, testing is required ).
Third, the changes in Pillow postdate that question about PIL by a good 3 years, and the libtiff support was only merged last year.
jondo commentedon May 13, 2014
Sorry, of course I meant WRITE_LIBTIFF. That's what I currently use to activate LZW compression.
When I do not set it, I get an uncompressed file with a compression tag value of COMPRESSION_LZW.
So I think this line should have "tiff_lzw" added.
wiredfool commentedon May 15, 2014
Ref #431. Should check there to see if packbits is returning the same thing. If so, we should just run any compression through libtiff.
jondo commentedon May 19, 2014
Yes, without WRITE_LIBTIFF the compression = 'packbits' saves an uncompressed file that has the PackBits tag set.
Tested with:
wiredfool commentedon May 19, 2014
Right then, I think that's answered. Time to run the writes through libtiff.
Use libtiff for writing any compressed tiff files, Fixes python-pillo…