Ticket #2251 (assigned defect)

Opened 5 months ago

Last modified 4 months ago

Jasper driver fails with small jp2 image

Reported by: ssakharov Assigned to: dron (accepted)
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

Greyscale2.jp2 (151.9 kB) - added by ssakharov on 02/29/08 13:27:26.

Change History

02/29/08 13:00:46 changed by ssakharov

  • version changed from unspecified to svn-trunk.

02/29/08 13:27:26 changed by ssakharov

  • attachment Greyscale2.jp2 added.

02/29/08 13:51:46 changed by warmerdam

  • keywords set to jpeg2000 jasper.
  • cc set to dron.

02/29/08 13:53:43 changed by warmerdam

  • description changed.

02/29/08 15:25:12 changed by rouault

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]

02/29/08 20:01:13 changed by ssakharov

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

04/01/08 03:48:09 changed by dron

  • status changed from new to assigned.
  • owner changed from warmerdam to dron.

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