[gdal-dev] NITF 16bit pixel scaling using NBITS/ABPP
Even Rouault
even.rouault at mines-paris.org
Wed Dec 15 12:25:50 EST 2010
Le mercredi 15 décembre 2010 12:52:06, Smart, Gary a écrit :
> We are reading NITF images which occupy the lower 12bits of a 16bit
> datatype. These images clearly have ABPP=12 and NBPP=16 set in the
> header. However, when I use GetMetadataItem("NBITS"), the string
> returned is always 'null'. I have also tried GetMetadataItem("ABPP") -
> which also returns 'null'.
>
You can guess the NBPP from the datatype of the band. If it's Int16 or UInt16,
then NBPP = 16
The ABPP can be read through the "NITF_ABPP" metadata item (as seen in the
output of gdalinfo on such a file)
>
>
> Does anyone know how to access this information in the NITF header. Are
> there any recorded problems regarding this?
>
> I am using GDAL version 1.7.1 on SLES10 linux.
>
>
>
> Gary
More information about the gdal-dev
mailing list