Opened 10 years ago

Closed 10 years ago

#3027 closed defect (fixed)

jp2kak driver can't display this unsigned 16 bit J2K image

Reported by: gaopeng Owned by: warmerdam
Priority: normal Milestone: 1.6.2
Component: GDAL_Raster Version: 1.6.1
Severity: normal Keywords: JP2KAK
Cc:

Description

It will display as a black box and the values when identified will be all 0.

The original raster was created with Intergraph add-ons, such as Geomedia Image and Geomedia OrthoPro?.

The jp2 will display in Erdas Imagine and FWTools with no modification.

In OpenEV (GDAL) it can open properly.

The test image is at ftp://GDAL@ftp.esri.com/Raster.zip.

Change History (2)

comment:1 Changed 10 years ago by warmerdam

Keywords: JP2KAK added; JP2000 removed
Status: newassigned

I have confirmed this problem in trunk and am digging further.

comment:2 Changed 10 years ago by warmerdam

Resolution: fixed
Status: assignedclosed

I have established that pixels handled via the UInt16 case in transfer_bytes() were not being offset from the -32K to 32K range into the 0 to 64K range and so were mostly being truncated to zero. I have established this was a problem in 1.6 branch as well though not in 1.5 branch. I tried to identify where the bug was incorporated but am still unsure. r16877 and r16871 seem like possible candidates.

I have fixed in trunk (r17244), 1.6 branch (r17245) and 1.6-esri branch (r17246).

There is no test case for this file variation (unfortunately), due to lack of a small file with these characteristics.

Note: See TracTickets for help on using tickets.