[Gdal-dev] jpeg 2000 component precision
Rocky Rhodes
rocky at google.com
Tue Jul 14 21:21:36 EDT 2009
I'm dealing with jpeg2000 images that have 12 bit components and have been
going through the jp2kak Kakadu driver. Earlier versions of this code
truncated my 12 bit values to 8 bits, but the latest code returns all 12
bits to me, but I get my 12 bits in the lower 12 bits of the 16 bit data
value. For this to be interpreted sensibly as an image, these 12 bits
should either be shifted into the top 12 bits of the 16 bit data value or
there should be a way to query the raster band and get its precision,
independent of the type of the data value. I looked briefly at the Jasper
implementation and I think it would also return the 12 bits in the low 12
bits of a 16 bit data value.
I have modified a version of the kakadu driver code to shift the bits
appropriately, but am not sure what the "correct" solution to this problem
really should be. Any thoughts from folks with more gdal experience?
--
View this message in context: http://n2.nabble.com/jpeg-2000-component-precision-tp3260339p3260339.html
Sent from the GDAL - Dev mailing list archive at Nabble.com.
More information about the gdal-dev
mailing list