-
Notifications
You must be signed in to change notification settings - Fork 512
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
Support for .MPO images #787
Comments
I think you're asking python-pptx to convert MPO to, say, PNG. I wouldn't ask python-pptx to do that. I'd find another converter and do it in batch. (In my code I convert EPS or SVG to PNG before embedding with python-pptx.) |
That's a good point, but JPEG images encoded as MPO images are basically working nice when inserted through any program working with presentations. Also, MPO images are often saved with I looked into the code and it fails only because It can be fixed using monkey patching easily, but probably not recommended. I assume there is a clever way - to add a custom This is just an improvement to keep in track with the latest technologies, saving JPEG pictures in form of MPOs when taking with Portrait modes on smartphones (because of the depth sensor), people will work with such images in the long run. For reference: python-pillow/Pillow#1138 (comment) |
Currently, .MPO images are not supported.
I took a photo with an iPhone in portrait mode, which encodes images in .MPO format: https://fileinfo.com/extension/mpo
Although the picture was saved in .jpeg extension, it is .MPO encoded and cannot be parsed by pptx. As this is a pretty popular technology in smartphones, probably it makes sense to support this.
Here is the error I got:
(ValueError("unsupported image format, expected one of: dict_keys(['BMP', 'GIF', 'JPEG', 'PNG', 'TIFF', 'WMF']), got 'MPO'"), False)
The text was updated successfully, but these errors were encountered: