-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Cannot convert JPEG file: improper call to JPEG library in state 201 #6475
Comments
The file is MPF (Multi-Picture Format), with two images. IM has only recently acquired to ability to read the images after the first, and I suspect a problem in that area. The file is unusual in that it has 434 extra bytes (0xFF) between the EOI of the first image and the SOI of the second image. These extra bytes are legal, but may be causing problems to IM. A developer may comment. |
I can reproduce this issue and it looks like we made a mistake when adding support for MPF. I am working on a fix and it looks like this file contains three images. I will continue working on this tomorrow (het is nu wat laat) and try to get this resolved before the next release. |
Much appreciated! Welterusten. ;-) |
Dirk, it does not convert for me either on my Mac OSX Ventura (M1).
Prefacing with MPO: also does not work magick MPO:252267836-6d4d0a89-510d-4fa0-8b73-d96ea8144908.jpg x.png magick: Premature end of JPEG file Nor does changing the suffix to mpo magick 252267836-6d4d0a89-510d-4fa0-8b73-d96ea8144908.mpo x.png magick: Premature end of JPEG file |
@dlemstra wrote:
exiftool agrees with my analysis, that there are 2 MPF images. The first of these also contains an embedded thumbnail. |
Yeah that embedded thumbnail is causing ImageMagick to think that there are 3 images instead of two. I will need to redesign how we are attempting to read the MPF image(s). |
This issue should be fixed in the next release. We will no longer try to read the MPF image. We will only do that if the extension of the image is |
ImageMagick version
7.1.1.12-1.el9
Operating system
Linux
Operating system, version and so on
AlmaLinux 9.2
Description
Hi!
There seems be a regression in the latest version. With 7.1.1.11 I am able to convert the attached image without any issues, warnings, whatsover. With 7.1.1.12 I get errors from ImageMagick while converting this JPEG image about premature end and the convert seems to fail. Although it does produce some images.
Thanks in advance. :-)
Steps to Reproduce
Images
The text was updated successfully, but these errors were encountered: