-
Notifications
You must be signed in to change notification settings - Fork 11
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 MPO #11
Comments
shouldn't be hard at all. But could you attach an unoptimized test MPO file to this issue report for me? |
Downloading it saves it as a .jpg and picopt/PIL detects it as type JPEG and then mozjpeg compresses it by 3.54%. Maybe take your MPO file and conceal it in a zip or tarball so it's not processed by github. |
unreproduceable |
I just replicated this exact issue with some GoPro files that the camera exports with the .JPG suffix but PIL recognizes them as ANIMATED_MPO. |
I'd like to work on this, but I'm searching for a tool that explodes MPO files without losing any JPEG fidelity and a tool that creates MPO files from multiple JPEGS. The python Pillow library can read MPOs, but it lacks a facility for saving these JPEGS without re-encoding them. |
picopt 4.0.0 now supports converting MPOs to regular JPEGS if and only if the MPO has a "Baseline MP Primary Image" tagged. MPOs contain a series of JPEGS and are used for many different purposes. I think the original conception was for stereo images. For stereo images there is a left and right JPEG, but no primary jpeg. Picopt should not convert these files. Probably the largest actual usage of MPO is storing thumbnails inside the same file as the primary image. This is frequently done by digital cameras. When you convert MPOs to JPEG with picopt, the primary image is extracted and losslessly optimized and the thumbnails are discarded. |
Almost all of my jpeg pictures from various cameras aren't compressing:
Stepping through the code the file is being recognized by PIL as MPO. These are jpeg files with a smaller photo embedded as a thumbnail, commonly done by cameras to speed viewing.
Here's some discussion:
python-pillow/Pillow#1138
Can picopt better describe why it won't optimize the file, at least when a single file targeted? Maybe something like one of "Not an image or "Image type foo not recognized"
The text was updated successfully, but these errors were encountered: