JP2 image not supported?

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
dportabella
Posts: 3
Joined: 2012-04-21T06:40:15-07:00
Authentication code: 13

JP2 image not supported?

Post 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
Bonzo
Posts: 2971
Joined: 2006-05-20T08:08:19-07:00
Location: Cambridge, England

Re: JP2 image not supported?

Post 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.
dportabella
Posts: 3
Joined: 2012-04-21T06:40:15-07:00
Authentication code: 13

Re: JP2 image not supported?

Post by dportabella »

http://www.imagemagick.org/download/bin ... 3.0.tar.gz

convert PSP_004134_1995_COLOR.JP2 out.png
Bonzo
Posts: 2971
Joined: 2006-05-20T08:08:19-07:00
Location: Cambridge, England

Re: JP2 image not supported?

Post 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?
User avatar
glennrp
Posts: 1147
Joined: 2006-04-01T08:16:32-07:00
Location: Maryland 39.26.30N 76.16.01W

Re: JP2 image not supported?

Post by glennrp »

I think you need the "jasper" delegate to handle jp2 images. See http://www.imagemagick.org/download/delegates/
dportabella
Posts: 3
Joined: 2012-04-21T06:40:15-07:00
Authentication code: 13

Re: JP2 image not supported?

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