Hi,

I want to convert an indexed image to a rgba color image with help of a colortable

so I created a GDALDataset

drv = (GDALDriver *) GDALGetDriverByName("MEM");
if (!drv) {
     throw "Unable to register GDAL Memory Driver";
}
GDALDataset* tmpdata = drv->Create("rawRadar",mysqlData.columns,mysqlData.rows,1,GDT_Byte,NULL);

// Added the colortable
CPLErr err = tmpdata->GetRasterBand(1)->SetColorTable(cTable);

// Inserted the data from a byte array
tmpdata->RasterIO(GF_Write,0,0,mysqlData.columns,mysqlData.rows,
(unsigned char *)mysqlData.data.c_str(),mysqlData.columns,mysqlData.rows,
            GDT_Byte,1, NULL, 0, 0,0);

From here on I'm stuck.
How do I go on to convert this data to a in memory GDALDataset with 4 channels (R,G,B,A)

Thanks

Kees Kling
_______________________________________________
gdal-dev mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/gdal-dev

Reply via email to