Skip to content

Only read different sizes for "Large Thumbnail" MPO frames#5168

Merged
hugovk merged 2 commits intopython-pillow:masterfrom
radarhere:mpo
Mar 7, 2021
Merged

Only read different sizes for "Large Thumbnail" MPO frames#5168
hugovk merged 2 commits intopython-pillow:masterfrom
radarhere:mpo

Conversation

@radarhere
Copy link
Copy Markdown
Member

Resolves #5164

MPO images are a multi-frame format. The image from the issue reports an incorrect size for the second frame in the image.

There are different MP Types according to the spec - 'Baseline MP Primary Image', 'Large Thumbnail', 'Multi-Frame Image' and 'undefined'.

This PR resolves the issue by making it so that only 'Large Thumbnail' frames can have a different size. This isn't mentioned in the spec, but it seems possible.

This did cause one of our existing tests to fail, but that was not an image found in the wild - it was an existing test image that I hexedited. When I changed the MPType to match the image from the original issue, the test passes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

MPO format loading error when EXIF data is present

2 participants