Skip to content

Conversation

@radarhere
Copy link
Member

@radarhere radarhere commented Feb 23, 2019

Resolves #3644

The new image for the test suite is taken from #3557. PNG's _open method only reads up until the first IDAT chunk. In that image, the eXIf chunk appears after that, meaning that the EXIF data will not be read until the load method is called.

Rather than loading the whole image in _open, I suggest that _getexif loads the image if the EXIF chunk is not yet present. The downside of this is that im.info["exif"] is unreliable if the image has not been loaded, but as this is a new feature, that unreliability is not a step backwards at least.

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.

Please can you also add release notes?

@radarhere
Copy link
Member Author

Okay, done. Also, in docs/handbook/image-file-formats.rst I've added a version string and adjusted the wording of my new paragraph.

@hugovk
Copy link
Member

hugovk commented Mar 11, 2019

Thanks!

@hugovk hugovk merged commit 25e40dd into python-pillow:master Mar 11, 2019
@radarhere radarhere deleted the png_exif branch March 11, 2019 20:28
@trougnouf trougnouf mentioned this pull request Jun 9, 2021
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.

2 participants