[gdal-dev] tiff with colortable loses alpha values?

Vincent Schut schut at sarvision.nl
Tue Sep 28 10:24:18 EDT 2010


  Hi,

I'm creating a geotiff with colortable using the python bindings, 
however, the alpha value of the colorentry is lost / always set to 255 
(says gdalinfo on the output image).
Does gdal/geotiff with colortable not support rbga?
Or, what am I doing wrong?

Testcase is below:


from osgeo import gdal
gtiff = gdal.GetDriverByName('GTiff')
ds = gtiff.Create('/home/vincent/test.tif', 1, 1, 1, gdal.GDT_Byte)
ct = gdal.ColorTable()
ct.SetColorEntry(1, (100, 100, 100, 100))
ds.GetRasterBand(1).SetColorTable(ct)

gdalinfo on /home/vincent/test.tif says 100,100,100,255 for colorentry 1...

using gdal from svn, internal geotiff.

Regards,
Vincent.


More information about the gdal-dev mailing list