Discussion:
Assertion failure reading possibly corrupt JPEG2000 file
Steve Madsen
2010-03-24 14:42:42 UTC
Permalink
While running "identify" on http://lightyearsoftware.com/image.jp2, I see the following on Solaris i386 (uname -a: SunOS xxx 5.11 snv_89 i86pc i386 i86pc; ImageMagick 6.6.0-8, Jasper 1.900.1):

Assertion failed: dec->numcomps == 3, file jpc_dec.c, line 1077, function jpc_dec_tiledecode
Abort (core dumped)

On Mac OS X 10.6.2 (current ImageMagick and libraries from MacPorts), for the same image:

identify: MissingImageChannel `image.jp2' @ error/jp2.c/ReadJP2Image/413.

OS X Preview is able to open the file and display something, though it reports dimensions of 512x512 and yet is very blocky. It makes me think the image stream is corrupted midway.

This sounds very similar to http://studio.imagemagick.org/pipermail/magick-bugs/2009-June/003251.html, but that report didn't include platform information. Given my mixed results, platform is important.
--
Steve Madsen <***@lightyearsoftware.com>
Light Year Software, LLC http://lightyearsoftware.com
Alan Fry
2010-03-24 15:26:51 UTC
Permalink
Post by Steve Madsen
While running "identify" on http://lightyearsoftware.com/image.jp2,
I see the following on Solaris i386 (uname -a: SunOS xxx 5.11 snv_89
Assertion failed: dec->numcomps == 3, file jpc_dec.c, line 1077,
function jpc_dec_tiledecode
Abort (core dumped)
On Intel MacPro 10.5.8 ImageMagick 6.3.3 I get this error:

jpc_dec.c:1080: failed assertion `dec->numcomps == 3'
Abort trap

Image opens in Preview and GraphicConverter, 512x512, 72,72 ppi.
Image, as you say, is very blocky.

Alan Fry
Post by Steve Madsen
On Mac OS X 10.6.2 (current ImageMagick and libraries from
413.
OS X Preview is able to open the file and display something, though
it reports dimensions of 512x512 and yet is very blocky. It makes me
think the image stream is corrupted midway.
This sounds very similar to http://studio.imagemagick.org/pipermail/magick-bugs/2009-June/003251.html
, but that report didn't include platform information. Given my
mixed results, platform is important.
--
Light Year Software, LLC http://lightyearsoftware.com
_______________________________________________
Magick-bugs mailing list
http://studio.imagemagick.org/mailman/listinfo/magick-bugs
d***@imagemagick.org
2010-03-24 16:05:11 UTC
Permalink
Post by Steve Madsen
identify: MissingImageChannel `image.jp2'
The image is missing a blue channel. If we remove this restriction we get
a blocky image of a bowl.
Steve Madsen
2010-03-24 16:18:19 UTC
Permalink
Post by d***@imagemagick.org
Post by Steve Madsen
identify: MissingImageChannel `image.jp2'
The image is missing a blue channel. If we remove this restriction we get
a blocky image of a bowl.
I don't claim the image is valid, but an error message (as on OS X) is better than an assertion failure + core dump (as on Solaris).

The questions are: why is the behavior different on the two platforms, and is it an ImageMagick problem or a Jasper problem?
--
Steve Madsen <***@lightyearsoftware.com>
Light Year Software, LLC http://lightyearsoftware.com
d***@imagemagick.org
2010-03-24 16:36:31 UTC
Permalink
Post by Steve Madsen
is better than an assertion failure
Agreed, except the exception is coming from the Jasper delegate library rather
than ImageMagick. The path forward would be to post a bug report to the
Jasper development team. We are not connected with Jasper other than we
use their software as an optional delegate library within ImageMagick.
Loading...