Skip to content

Conversation

radarhere
Copy link
Member

Resolves #4820

This issue reports a user finding a PNG with a tEXt chunk containing EXIF data. Pillow reads tEXt chunks into the info dictionary as a string, but EXIF data is expected as bytes, so an error was raised.

This PR reads EXIF data from tEXt chunks into the info dictionary as bytes, instead of as a string. I used Pillow to create add a modified version of an existing test image with a tEXt chunk of EXIF data.

@radarhere radarhere added the Exif label Jul 31, 2020
@hugovk hugovk merged commit fdc0920 into python-pillow:master Aug 11, 2020
@radarhere radarhere deleted the exif_text branch August 11, 2020 21:58
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.

TypeError: exif.startswith(b"Exif\x00\x00"): arg must be str

2 participants