Ticket #2251 (closed defect: invalid)

Opened 5 years ago

Last modified 2 years ago

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) (diff)

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 Download (151.9 KB) - added by ssakharov 5 years ago.

Change History

Changed 5 years ago by ssakharov

  • version changed from unspecified to svn-trunk

Changed 5 years ago by ssakharov

Changed 5 years ago by warmerdam

  • cc dron added
  • keywords jpeg2000 jasper added

Changed 5 years ago by warmerdam

  • description modified (diff)

Changed 5 years ago 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]

Changed 5 years ago by ssakharov

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

Changed 5 years ago by dron

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

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

Changed 2 years ago by rouault

  • status changed from assigned to closed
  • resolution set to invalid

Not a GDAL bug. Closing

Note: See TracTickets for help on using tickets.