Opened 15 years ago

Closed 12 years ago

#2251 closed defect (invalid)

Jasper driver fails with small jp2 image

Reported by: ssakharov Owned by: dron
Priority: normal Milestone:
Component: GDAL_Raster Version: svn-trunk
Severity: normal Keywords: jpeg2000 jasper
Cc: dron

Description (last modified by warmerdam)

Attempting to use the example jp2 images from the ecw sdk, ie testdata/Grayscale2.jp2 causes gdal to throw an error:

$ ./gdal_translate.exe -of GTiff testdata/Greyscale2.jp2 gray.tiff
Input file size is 1500, 1500
0jpc_dec_decodepkts failed
error: cannot decode code stream
error: cannot get box
ERROR 1: IReadBlock failed at X offset 0, Y offset 0
ERROR 1: GetBlockRef failed at X block offset 0, Y block offset 0

This can be seen via gddal_translate and also band.readraster via code. The jasper library is the uuid modified version.

Attachments (1)

Greyscale2.jp2 (151.9 KB ) - added by ssakharov 15 years ago.

Download all attachments as: .zip

Change History (8)

comment:1 by ssakharov, 15 years ago

Version: unspecifiedsvn-trunk

by ssakharov, 15 years ago

Attachment: Greyscale2.jp2 added

comment:2 by warmerdam, 15 years ago

Cc: dron added
Keywords: jpeg2000 jasper added

comment:3 by warmerdam, 15 years ago

Description: modified (diff)

comment:4 by Even Rouault, 15 years ago

I get the same result (=error) when doing a gdalinfo with the Jasper driver. JP2ECW and JP2MrSID drivers work fine with gdalinfo. But JP2MrSID driver fails to read the image (when doing a gdal_translate) for example with the following error :

ERROR 1: MrSIDRasterBand::IRasterIO(): Failed to load image.
JP2: internal error (%s) [50905]

comment:5 by ssakharov, 15 years ago

For me the JP2MrSID driver works without problem, including gdal_translate.

comment:6 by dron, 15 years ago

Owner: changed from warmerdam to dron
Status: newassigned

This file cannot be read with the Jasper library, so there is little I can do about that (I don't want to dig into Jasper to solve this problem). BTW, it cannot be decoded with the OpenJPEG library either. I think it should be reported to JesPer or OpenJPEG authors.

Best regards, Andrey

comment:7 by Even Rouault, 12 years ago

Resolution: invalid
Status: assignedclosed

Not a GDAL bug. Closing

Note: See TracTickets for help on using tickets.