ImageMagick fails parsing JPEG data generated by Picasa.

Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
Post Reply
lhunath

ImageMagick fails parsing JPEG data generated by Picasa.

Post by lhunath »

Any images I've edited using Picasa and saved to disk are no longer parsable by ImageMagick:

Code: Select all

$ convert .orig/20081025T181312.jpg -resize 100 .thumbs/20081025T181312.jpg
convert: Corrupt JPEG data: premature end of data segment `.orig/20081025T181312.jpg' @ jpeg.c/EmitMessage/227.
You can find the .orig/20081025T181312.jpg referred to in the code above at this URL:
http://lhunath.lyndir.com/catalog/.orig ... 181312.jpg

Can someone confirm whether this is an ImageMagick bug or whether the JPEG image data is actually corrupt (a Picasa bug)?
I know the image renders just fine in any image viewer I can throw it at.

By the way, this is ImageMagick 6.4.8-1 (MacPorts) and 6.4.8.3 (Gentoo).
Picasa v3.0.2 (OS X)
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: ImageMagick fails parsing JPEG data generated by Picasa.

Post by magick »

The JPEG delegate library issues the exception, not ImageMagick. It should be a warning meaning the conversion completes.
lhunath

Re: ImageMagick fails parsing JPEG data generated by Picasa.

Post by lhunath »

The conversion does complete generating a pure black image of the correct dimensions.
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: ImageMagick fails parsing JPEG data generated by Picasa.

Post by magick »

The conversion was successful for us. We're using ImageMagick 6.4.8-9 under Fedora Linux.
lhunath

Re: ImageMagick fails parsing JPEG data generated by Picasa.

Post by lhunath »

Same issue with 6.4.8-9 here.
More specifically:
6.4.8-9 +graphviz +gs +hdri +jbig +jpeg2k +lcms +lqr +mpeg -X +perl +q16 +rsvg +wmf (MacPorts)
6.4.8-3 +graphviz -gs -hdri -jbig +jpeg +jpeg2k -lcms -X +perl -q32 -q8 -svg -wmf (Gentoo)

This is using jpeg 6b_3

I suppose I can try building without jpeg2k.
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: ImageMagick fails parsing JPEG data generated by Picasa.

Post by magick »

It seems likely the problem is in the version of the JPEG library you use. Its always best not to trust images with corrupt data. It leads to unpredictable results as you are seeing here.
Post Reply