Page 1 of 1

JP2 image not supported?

Posted: 2012-04-21T06:48:45-07:00
by dportabella
I am trying to crop a JP2 image, but "convert" tells me:
convert: no decode delegate for this image format `PSP_004134_1995_COLOR.JP2' @ error/constitute.c/ReadImage/532.

either the image I have is not JP2, or "convert" does not fully support JP2.
I downloaded the last version of "convert" for mac: ImageMagick-x86_64-apple-darwin11.3.0.tar.gz
I converted a GIF image to JP2, so it looks like "convert" handles (at least partially) the JP2 format.

Can any one download this image and see if it works? (it's 512Mb image)
http://hirise-pds.lpl.arizona.edu/PDS/R ... _COLOR.JP2


A+,
David

Re: JP2 image not supported?

Posted: 2012-04-21T06:54:35-07:00
by Bonzo
What code are you using so I can try the same?

Gave up trying to download the file as it was going to take me 1/2hr.

Re: JP2 image not supported?

Posted: 2012-04-21T06:58:02-07:00
by dportabella
http://www.imagemagick.org/download/bin ... 3.0.tar.gz

convert PSP_004134_1995_COLOR.JP2 out.png

Re: JP2 image not supported?

Posted: 2012-04-21T06:59:34-07:00
by Bonzo
While I am trying it what does convert -list Format tell you when run?

Why have you added a link to the IM installation file?

Re: JP2 image not supported?

Posted: 2012-04-21T07:43:14-07:00
by glennrp
I think you need the "jasper" delegate to handle jp2 images. See http://www.imagemagick.org/download/delegates/

Re: JP2 image not supported?

Posted: 2012-04-21T08:53:48-07:00
by dportabella
great!

I have installed the jasper library/application.
I didn't manage to integrate it with imagemagick, but it works as a standalone program like this:
jasper --input ESP_011400_1680_RED.QLOOK.JP2 --output out.bmp

this image is 100Mb and it took some minutes to convert. The output was 400Mb.

Thanks again!

However, if I try to convert this 500Mb image,
http://hirise-pds.lpl.arizona.edu/PDS/R ... _COLOR.JP2
and jasper fails with:
error: cannot decode code stream
error: cannot load image data

Any idea?

David