[gdal-dev] GeoTiff and the 4th band

2011-04-18 Thread Nicolas Mayer
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 10

Re: [gdal-dev] GeoTiff and the 4th band

2011-04-18 Thread Even Rouault
Selon Nicolas Mayer : Retry by setting the PHOTOMETRIC creation option to MINISBLACK. Otherwise, by default, without specifying it, GDAL assumes that the PHOTOMETRIC is RGB and that the 4th band is an alpha band. You should get : Band 1 Block=100x20 Type=Byte, ColorInterp=Gray Band 2 Block=100x20

Re: [gdal-dev] GeoTiff and the 4th band

2011-04-18 Thread Nicolas Mayer
Even, thank you very much for answering me so quicly With the PHOTOMETRIC creation option to MINISBLACK, I get now : Band 1 Block=100x20 Type=Byte, ColorInterp=Gray Band 2 Block=100x20 Type=Byte, ColorInterp=Undefined Band 3 Block=100x20 Type=Byte, ColorInterp=Undefined Band 4 Block=100x20 Type=By

Re: [gdal-dev] GeoTiff and the 4th band

2011-04-18 Thread Even Rouault
Selon Nicolas Mayer : > Even, thank you very much for answering me so quicly > > With the PHOTOMETRIC creation option to MINISBLACK, I get now : > Band 1 Block=100x20 Type=Byte, ColorInterp=Gray > Band 2 Block=100x20 Type=Byte, ColorInterp=Undefined > Band 3 Block=100x20 Type=Byte, ColorInterp=Und

Re: [gdal-dev] GeoTiff and the 4th band

2011-04-18 Thread Nicolas Mayer
Even, Thank you very much ! With the two creation options : PHOTOMETRIC=RGB and ALPHA=NO, I obtain the same behaviour I whish. Can you explain me where you found this answer ? (to help me to become more autonomous with GDAL) Thank you again Nicky 2011/4/18 Even Rouault > Selon Nicolas Maye

Re: [gdal-dev] GeoTiff and the 4th band

2011-04-18 Thread Even Rouault
Selon Nicolas Mayer : > Even, Thank you very much ! > > With the two creation options : PHOTOMETRIC=RGB and ALPHA=NO, I obtain the > same behaviour I whish. > > Can you explain me where you found this answer ? (to help me to become more > autonomous with GDAL) > Well, for an advanced question lik

Re: [gdal-dev] GeoTiff and the 4th band

2011-04-18 Thread Nicolas Mayer
OK. Thank you very much. Nicky 2011/4/18 Even Rouault > Selon Nicolas Mayer : > > > Even, Thank you very much ! > > > > With the two creation options : PHOTOMETRIC=RGB and ALPHA=NO, I obtain > the > > same behaviour I whish. > > > > Can you explain me where you found this answer ? (to help me t