[Gdal-dev] gdal_translate -co "PHOTOMETRIC=MINISBLACK" problem.

Aki Suvanto aki.suvanto at joensuu.fi
Thu Mar 29 08:30:11 EDT 2007


Hello,

I have a problem which relates to the gdal_translate and -co
"PHOTOMETRIC=MINISBLACK"

I'm trying to do mosaic with gdalwarp and I'm using 4 band 8 byte Geotiff aerial
images. Gdalwarp use the last band as Alpha so the mosaic image is not correct.


Therefore I have to change the last band something different than the alpha. If
I'm understand right the gdal_translate -co "PHOTOMETRIC=MINISBLACK" should
change the band ColorInterpretation from alpha to something else. This mosaic
process works fine with img-format, but it would be faster to use Geotiff
images.

So here are my commands:

gdal_translate -of Gtiff -co "PHOTOMETRIC=MINISBLACK" 1076.tif 1076_co.tif 

Input file size is 7563, 3462
0...10...20...30...40...50...60...70...80...90...100 - done.

gdalinfo 1076_co.tif

Driver: GTiff/GeoTIFF
Size is 7563, 3462
Coordinate System is `'
Origin = (306961.500000000000000,6961278.500000000000000)
Pixel Size = (0.500000000000000,-0.500000000000000)
Corner Coordinates:
Upper Left  (  306961.500, 6961278.500)
Lower Left  (  306961.500, 6959547.500)
Upper Right (  310743.000, 6961278.500)
Lower Right (  310743.000, 6959547.500)
Center      (  308852.250, 6960413.000)
Band 1 Block=7563x1 Type=Byte, ColorInterp=Red
Band 2 Block=7563x1 Type=Byte, ColorInterp=Green
Band 3 Block=7563x1 Type=Byte, ColorInterp=Blue
Band 4 Block=7563x1 Type=Byte, ColorInterp=Alpha
   
So if there is something wrong, please tell me.


Best regards,

Aki




More information about the Gdal-dev mailing list