Problem when convert JPEG-2000(jp2) to JPG

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
namle2605
Posts: 6
Joined: 2012-11-06T23:38:14-07:00
Authentication code: 67789

Problem when convert JPEG-2000(jp2) to JPG

Post 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
namle2605
Posts: 6
Joined: 2012-11-06T23:38:14-07:00
Authentication code: 67789

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

Post by namle2605 »

I hasn't found the solution for this issue. Who can help me? :(
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

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

Post by snibgo »

Gimp and Quicktime Picture Viewer also can't open it.
snibgo's IM pages: im.snibgo.com
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

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

Post 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.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

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

Post 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.
Post Reply