JPEG 2000 support broken in latest version?
Posted: 2012-08-27T03:32:35-07:00
After upgrading to the latest version of ImageMagick JPEG 2000 support seems to be somehow broken. For instance, trying to do this:
gives me a segmentation fault. Ditto for any other operations (convert, compare, etc.) on JPEG 2000 images. Other JP2 images give me errors such as:
I remember encountering similar issues in previous versions of IM, but only for large images (most likely related the underlying JasPer library, which appears to have pretty poor memory management). But now I'm also getting this for very small (e.g. 138 kB lossless!) images!
Some aditional info on my IM version and my system:
IM:
Config:
System:
UPDATE:
Since I submitted this bug I did some additional tests, and I think there are at least 2 issues here. For convenience I uploaded a ZIP file with 3 test images here:
http://dl.dropbox.com/u/9523497/testIM.zip
Here's what happens if I try to identify each of them:
1. Small test image with embedded ICC profile
2. Same image as above, but without the embedded ICC profile
So this works fine.
3. Finally this one (no embedded ICC profiles, slightly larger, but still pretty small):
This looks like another problem altogether, but I have no idea why it is happening!
Code: Select all
identify target.jp2
Code: Select all
error: cannot decode code stream
identify.exe: unable to decode image file `balloon_kdu.jp2' @ error/jp2.c/ReadJP2Image/402.
Some aditional info on my IM version and my system:
IM:
Code: Select all
Version: ImageMagick 6.7.9-1 2012-08-21 Q8 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2012 ImageMagick Studio LLC
Features: OpenMP
Code: Select all
$ identify -list configure
Path: [built-in]
Name Value
-------------------------------------------------------------------------------
NAME ImageMagick
Path: C:\Program Files\ImageMagick-6.7.9-Q8\configure.xml
Name Value
-------------------------------------------------------------------------------
CC vs10
COPYRIGHT Copyright (C) 1999-2012 ImageMagick Studio LLC
DELEGATES bzlib freetype jpeg jp2 lcms png tiff x11 xml wmf zlib
FEATURES OpenMP
HOST Windows
LIB_VERSION 0x679
LIB_VERSION_NUMBER 6,7,9,0
NAME ImageMagick
RELEASE_DATE 2012-09-01
VERSION 6.7.9
WEBSITE http://www.imagemagick.org
Code: Select all
OS Name: Microsoft Windows XP Professional
OS Version: 5.1.2600 Service Pack 3 Build 2600
OS Configuration: Member Workstation
OS Build Type: Multiprocessor Free
System type: X86-based PC
Processor(s): 1 Processor(s) Installed.
[01]: x86 Family 15 Model 6 Stepping 5 GenuineIntel ~2992 Mhz
BIOS Version: HPQOEM - 20070413
Total Physical Memory: 999 MB
Available Physical Memory: 138 MB
Virtual Memory: Max Size: 2,048 MB
Since I submitted this bug I did some additional tests, and I think there are at least 2 issues here. For convenience I uploaded a ZIP file with 3 test images here:
http://dl.dropbox.com/u/9523497/testIM.zip
Here's what happens if I try to identify each of them:
1. Small test image with embedded ICC profile
Code: Select all
$ identify target.jp2
Segmentation fault
Code: Select all
$ identify target_noICC.jp2
target_noICC.jp2 JP2 437x303 437x303+0+0 8-bit RGB 137KB 0.141u 0:00.141
3. Finally this one (no embedded ICC profiles, slightly larger, but still pretty small):
Code: Select all
$ identify balloon.jp2
error: cannot decode code stream
identify.exe: unable to decode image file `balloon.jp2' @ error/jp2.c/ReadJP2Image/402.