Skip to content

Tiff: Add support for JPEG quality#3886

Merged
hugovk merged 5 commits intopython-pillow:masterfrom
olt:tiff-jpeg-quality
Jul 1, 2019
Merged

Tiff: Add support for JPEG quality#3886
hugovk merged 5 commits intopython-pillow:masterfrom
olt:tiff-jpeg-quality

Conversation

@olt
Copy link
Contributor

@olt olt commented Jun 4, 2019

Allow changing the image quality for JPEG compressed TIFFs.

Note: This PR depends on #3861

@radarhere radarhere changed the title tiff: Add support for JPEG quality Tiff: Add support for JPEG quality Jun 4, 2019
@radarhere radarhere added the TIFF label Jun 4, 2019
@olt olt force-pushed the tiff-jpeg-quality branch 2 times, most recently from ffb0f27 to 1e91f70 Compare June 5, 2019 09:40
@olt
Copy link
Contributor Author

olt commented Jun 5, 2019

Squashed and rebased on master (#3861). All tests pass.

@olt
Copy link
Contributor Author

olt commented Jun 13, 2019

Rebased again. All ✅

olt added 2 commits June 26, 2019 06:33
- 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.
@radarhere radarhere force-pushed the tiff-jpeg-quality branch from a18a371 to 2b7d8be Compare June 25, 2019 20:34
Copy link
Member

@hugovk hugovk left a 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!

@olt
Copy link
Contributor Author

olt commented Jul 1, 2019

Merge conflict resolved. Added release notes to #3930

hugovk added a commit to hugovk/Pillow that referenced this pull request Jul 1, 2019
@hugovk hugovk mentioned this pull request Jul 1, 2019
22 tasks
@hugovk
Copy link
Member

hugovk commented Jul 1, 2019

Thank you for your patience! This'll be in 6.1.0.

@hugovk hugovk merged commit f2b9e88 into python-pillow:master Jul 1, 2019
hugovk added a commit that referenced this pull request Jul 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants