Opened 15 years ago

Closed 15 years ago

Last modified 15 years ago

#2399 closed defect (fixed)

Jasper JP2 reads as black for some JP2 images

Reported by: kyngchaos Owned by: Even Rouault
Priority: normal Milestone: 1.5.4
Component: GDAL_Raster Version: 1.5.1
Severity: normal Keywords: jasper JPEG2000
Cc: dron


(I thought I submitted a bug a while back, but I must have spaced out, sorry)

Some JP2 images read/convert as all black, using the Jasper JP2 driver. It may be a problem reading some optimizations from other JP2 writers? The RGB example I got from Greg Coats was made with the Kakadu tools outside of GDAL. The GDAL MrSID and Kakadu drivers read the image correctly (my ECW driver is currently broken, so I couldn't try that).

I tried applying the patch from r13715 in trunk but there was no change.

Attachments (1)

rgbwcmyk03.jp2 (18.3 KB ) - added by kyngchaos 15 years ago.

Download all attachments as: .zip

Change History (8)

by kyngchaos, 15 years ago

Attachment: rgbwcmyk03.jp2 added

comment:1 by Mateusz Łoskot, 15 years ago

Cc: Mateusz Łoskot added
Keywords: jasper added

comment:2 by Even Rouault, 15 years ago

But what's interesting is that :

jasper --input rgbwcmyk03.jp2 --output test.bmp --output-format bmp

generates a test.bmp which looks good ! So it seems it's a bug in the Jasper driver, but not in libjasper itself

comment:3 by Even Rouault, 15 years ago

Cc: Mateusz Łoskot removed
Owner: changed from warmerdam to Even Rouault


comment:4 by warmerdam, 15 years ago

Cc: dron added
Keywords: JPEG2000 added

Adding Andrey to cc: as he is the primary maintainer of the JPEG2000 (JasPer) driver.

comment:5 by Even Rouault, 15 years ago

Milestone: 1.5.4
Resolution: fixed
Status: newclosed

Fixed in trunk in r16036, in branches/1.6 in r16037 and in branches/1.5 in r16038

comment:6 by Coatman, 15 years ago

Thanks for your quick response, and for changing GDAL's Jasper-based JPEG2000 processing in 1.6/gdal/frmts/jpeg2000/jpeg2000dataset.cpp so that it now properly processes JP2 images whose dimensions are not a multiple of 256.

At the most recent version of gdal-1.6.0.tar.gz is dated 04-Dec-2008. I am unfamiliar with the GDAL source code update procedure. Approximately when would the updated jpeg2000dataset.cpp be included in downloadable GDAL source code available at ? Perhaps is usually updated monthly?

comment:7 by warmerdam, 15 years ago

Nightly snapshots appear at The "stable" series is 1.6 branch, and the trunk series is the development trunk. We don't produce nightly snapshots of 1.5 anymore.

I anticipate a 1.5.4 release will be produced within a few weeks. It is hard to predict when 1.6.1 will be produced. Likely by the end of February or so.

Note: See TracTickets for help on using tickets.