New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tiff: Add support for JPEG quality #3886
Conversation
ffb0f27
to
1e91f70
Compare
Squashed and rebased on master (#3861). All tests pass. |
Rebased again. All ✅ |
- Pass tagtype from v2 directory to libtiff encoder, instead of autodetecting type. - Use explicit types. E.g. uint32_t for TIFF_LONG to fix issues on platforms with 64bit longs. - Add support for multiple values (arrays). Requires type in v2 directory and values must be passed as a tuple. - Add support for signed types (e.g. TIFFTypes.TIFF_SIGNED_SHORT).
Uses JPEGQUALITY pseudo-tag from libtiff. Also changes the way tags are passed to PyImaging_LibTiffEncoderNew from dict to list to ensure that COMPRESSION tag is added before JPEGQUALITY. This is required as the COMPRESSION tag registers the JPEGQUALITY pseudo-tag.
a18a371
to
2b7d8be
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's also include this on Monday, if it's possible to resolve.
Please also add release notes for this and #3861 in https://github.com/python-pillow/Pillow/blob/master/docs/releasenotes/6.1.0.rst.
Thank you!
Merge conflict resolved. Added release notes to #3930 |
Thank you for your patience! This'll be in 6.1.0. |
Allow changing the image quality for JPEG compressed TIFFs.
Note: This PR depends on #3861