New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MPO format loading error when EXIF data is present #5164
Comments
Thanks very much for providing a test image. The incorrect reported size would be the cause, yes. Here is a link to the specification - https://web.archive.org/web/20190227081740/http://www.cipa.jp/std/documents/e/DC-007_E.pdf. I do think your image is just malformed. I've created PR #5168 as a possible solution though, where I posit that only 'Large Thumbnail' images can have frames of different sizes. |
The image that I received was created with the popular StereoPhotoMaker program. |
Are you able to upload the original image? I understand that you don't want it to be included in the test images, but it could be helpful to just verify that there isn't a 5472 by 3648 frame hiding in there. |
He did not explicitly give permission to share the image publicly, but he would certainly not be against using it for a private analysis. |
Someone sent me a MPO file that I was not able to open with Pillow
It looks like the second image of the file has EXIF data that might conflict with the loading process.
In particular, the reported size does not correspond to the image, but I was not able to figure out if it is the root cause of the bug.
I created a similar image that you can use for your tests and publish if you need. I copied the EXIF of the original file with some subtractions such as the embedded thumbnail. It exhibits the same behavior and is correctly loaded by some other players, such as geeqie or sView.
In this ZIP (pillow_mpo_exif_error.zip), you will find the sample image and a script that show the error with this output: [visible with 8.0.1]
As you can see, the second image is reported to be 5472×3648 but is actually 64×64 like the first one.
The text was updated successfully, but these errors were encountered: