[Gdal-dev] Create GTiff with 8bit color table
Oliver Eichler
oliver.eichler at gmx.de
Tue Sep 11 06:11:03 EDT 2007
Hi,
I try to make my first experiences with GDAL. I simply want to create some geotiff file from 8bit color table index data.
GDALDriverManager * drvman = GetGDALDriverManager();
driver = drvman->GetDriverByName("GTiff");
dataset = driver->Create("test.tif",width,height,1,GDT_Byte,0);
GDALRasterBand * band1 = dataset->GetRasterBand(1);
band1->SetColorInterpretation(GCI_PaletteIndex);
dataset->FlushCache();
This code will tell me:
ERROR 6: SetColorInterpretation() not supported for this dataset.
What's my fault during setup?
BTW is there any reason why GDALColorTable is not visible in the documentation?
Oliver
More information about the Gdal-dev
mailing list