Opened 14 years ago

Closed 14 years ago

#3540 closed defect (fixed)

8 Bit JP2 image returns NBIT=1

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

Description

Attached is an 8 bit JP2 image with values in 0-255 range. But the metadata item NBITS is set to 1.

Attachments (1)

customgraphic1.jp2 (434 bytes ) - added by gaopeng 14 years ago.

Download all attachments as: .zip

Change History (6)

by gaopeng, 14 years ago

Attachment: customgraphic1.jp2 added

comment:1 by warmerdam, 14 years ago

Keywords: jp2kak added
Owner: changed from warmderdam to warmerdam

comment:2 by warmerdam, 14 years ago

Status: newassigned

I believe this is because one bit files are currently being automatically rescaled (poorly) to 8bit by the strip_decompressor. I'll dig a bit deeper.

Note, Gao has implemented a preliminary fix in 1.6-esri to drop the metadata (r19526).

comment:3 by warmerdam, 14 years ago

Gao,

I have modified the jp2kak driver in trunk to now actually fetch < 8bit images with their natural precision (r19533). Would you like me to backport this to the 1.6-esri tree?

comment:4 by gaopeng, 14 years ago

Frank,

Yes. Please.

comment:5 by warmerdam, 14 years ago

Resolution: fixed
Status: assignedclosed

The changes have been backported into 1.6-esri (r19540) and r19526 has been backed out so NBITS shows up.

Note: See TracTickets for help on using tickets.