You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Due to a "feature" of the Python imaging library Pillow/PIL some JPEGs are identified as MPO, i.e. when jpegcrop checks for image.format=="JPEG" it misses those JPEG images where image.format=="MPO".
MPO files are normal JPEG images but contain a tag which can contain other data which may be additional JPEG images, possibly stereoscopic or sometimes a larger thumbnail.
If the utilities which jpegcrop calls (exiftool, jpegtran) can handle MPO-style JPEG then jpegcrop can simply check for =="MPO" as well as =="JPEG". If there is a danger that the user will get unexpected behaviour (eg. a loss of valuable data) then a warning should be issued first.
In my case it's simply a regular JPEG from a Canon camera, I've no idea why it's MPO and not JPEG, so I just want it handled exactly the same as a JPEG.
The text was updated successfully, but these errors were encountered:
Hi howff, thanks a lot for this — and sorry for my slow response to your other issues — I've been wondering for a while why cropgui doesn't invoke jpegtran on some JPEGs, and I think you've just explained why. If you've a sample image that can reproduce this, I'd be very grateful — otherwise I'll have a search of recent images of my own when I get time.
(the bug report you link used to have a sample image, but no more..)
Due to a "feature" of the Python imaging library Pillow/PIL some JPEGs are identified as MPO, i.e. when jpegcrop checks for image.format=="JPEG" it misses those JPEG images where image.format=="MPO".
python-pillow/Pillow#4603
MPO files are normal JPEG images but contain a tag which can contain other data which may be additional JPEG images, possibly stereoscopic or sometimes a larger thumbnail.
If the utilities which jpegcrop calls (exiftool, jpegtran) can handle MPO-style JPEG then jpegcrop can simply check for =="MPO" as well as =="JPEG". If there is a danger that the user will get unexpected behaviour (eg. a loss of valuable data) then a warning should be issued first.
In my case it's simply a regular JPEG from a Canon camera, I've no idea why it's MPO and not JPEG, so I just want it handled exactly the same as a JPEG.
The text was updated successfully, but these errors were encountered: