Page 1 of 1

Problem when convert JPEG-2000(jp2) to JPG

Posted: 2012-11-08T19:26:42-07:00
by namle2605
When convert JPEG2000 file to JPG file with Imagemagick on Linux, but I always got following error:

Code: Select all

    # convert Full.jp2 Full.jpg
    error: cannot decode code stream
    convert: unable to decode image file `Full.jp2' @ error/jp2.c/ReadJP2Image/403.
    convert: no images defined `Full.jpg' @ error/convert.c/ConvertImageCommand/3044.
I also checked other topics and these are the delegates of my configuration:
DELEGATES bzlib fontconfig freetype jpeg jng jp2 lcms pango png tiff x11 xml zlib
I used ImageMagick 6.7.9-10 2012-10-12 Q16 on CentOS 6.2
My jasper version is 1.900.1
These are files:
https://www.dropbox.com/s/nu7wl4i7th8fdxx/Full.jp2
https://www.dropbox.com/s/qmgs603ismbuts4/Full.jpf

I posted the same issue at User forum and fmw42 guested had a problem when IM convert CMYK JPEG-2000 Image.
We get more information at :viewtopic.php?f=1&t=22228&p=92036

Thanks and best regards,
Nam Le

Re: Problem when convert JPEG-2000(jp2) to JPG

Posted: 2012-11-22T10:19:29-07:00
by namle2605
I hasn't found the solution for this issue. Who can help me? :(

Re: Problem when convert JPEG-2000(jp2) to JPG

Posted: 2012-11-22T10:34:13-07:00
by snibgo
Gimp and Quicktime Picture Viewer also can't open it.

Re: Problem when convert JPEG-2000(jp2) to JPG

Posted: 2012-11-22T11:39:51-07:00
by fmw42
Check the Jasper specs at http://www.ece.uvic.ca/~frodo/jasper/jasper.pdf. Try running it standalone with --force-srgb and see if that works. If so, then the IM developers may be able to trap on the colorspace and convert it or allow some settings or colorspace option to be used to handle it.

Re: Problem when convert JPEG-2000(jp2) to JPG

Posted: 2012-11-22T12:46:13-07:00
by fmw42
I tried using Jasper standalone and it does not read your image either.


jasper --input 1Full.jp2 --force-srgb --output 1Full.jpg --output-format jpg
error: cannot decode code stream
error: cannot load image data


So I suspect your image was created by some other program and is in a format the Jasper does not recognize.

What software created your image?

See the Applications and Libraries at http://en.wikipedia.org/wiki/JPEG_2000

It would appear you need one of the Applications that support the Advanced features.