[gdal-dev] GeoTiff and the 4th band
Nicolas Mayer
nmayer31000 at gmail.com
Mon Apr 18 04:30:06 EDT 2011
Hello
I have a problem with the geotiff (GTiff) driver.
I create a 4-bands raster image in a c++ program. The fourth band was
considered as an alpha band in the geotiff image (actually, it is near
infrared : NIR)
$ gdalinfo new_geotiff.tif
Driver: GTiff/GeoTIFF
Files: new__geotiff.tif
Size is 100, 100
(...)
Band 1 Block=100x20 Type=Byte, ColorInterp=Red
Mask Flags: PER_DATASET ALPHA
Band 2 Block=100x20 Type=Byte, ColorInterp=Green
Mask Flags: PER_DATASET ALPHA
Band 3 Block=100x20 Type=Byte, ColorInterp=Blue
Mask Flags: PER_DATASET ALPHA
Band 4 Block=100x20 Type=Byte, ColorInterp=Alpha
How to remove the Color interpretation 'alpha' and the mask flags ?
I want to have :
Band 1 Block=100x20 Type=Byte, ColorInterp=Red
Band 2 Block=100x20 Type=Byte, ColorInterp=Green
Band 3 Block=100x20 Type=Byte, ColorInterp=Blue
Band 4 Block=100x20 Type=Byte, ColorInterp=Undefined
I already tryed :
pDS->GetRasterBand(4)->SetColorInterpretation(GCI_Undefined );
I tryed too to set the creation option : "ALPHA" to "NO".
Thanks in advance for any help.
Nicky
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20110418/1e9575b2/attachment-0001.html
More information about the gdal-dev
mailing list