FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Always save TIFF with contiguous planar configuration by radarhere · Pull Request #5973 · python-pillow/Pillow · GitHub

Always save TIFF with contiguous planar configuration - #5973

Merged
hugovk merged 1 commit into
python-pillow:mainfrom
radarhere:planar_configuration
Mar 27, 2022
Merged

Always save TIFF with contiguous planar configuration#5973
hugovk merged 1 commit into
python-pillow:mainfrom
radarhere:planar_configuration

Conversation

Copy link
Copy Markdown
Member

Resolves #3622

If a TIFF image is opened with "separate" planar configuration, it is successfully read.

However, if that same image is saved, Pillow tries to keep the "separate" planar configuration from the input file, and the output image is broken.

This PR simply changes Pillow to always save "contiguous", and the output image is fixed.

kmilos commented Jan 18, 2022

Copy link
Copy Markdown
Contributor

The forced libtiff writer cannot preserve it either?

Copy link
Copy Markdown
Member Author

I don't know why the saved image is broken in main. However,

https://www.awaresystems.be/imaging/tiff/tifftags/planarconfiguration.html

The specification adds a warning that PlanarConfiguration=2 is not in widespread use and that Baseline TIFF readers are not required to support it.

So it seems like a good idea to avoid the "separate" setting for the sake of compatibility of our created images.

kmilos commented Jan 19, 2022

Copy link
Copy Markdown
Contributor

Yeah, it's ok to play it safe for this case. I was just wondering if there was a remote chance of preserving the original image configuration, but unfortunately don't have the time to experiment right now...

hugovk merged commit 1bc0e1b into python-pillow:main Mar 27, 2022
radarhere deleted the planar_configuration branch March 27, 2022 20:59
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

PlanarConfiguration save

3 participants


Back | FazBrowse Home | New Git URL