darrepac wrote:
If I have to do a script in Python, I will do it!
So yes please, I would like to see an example
Darre,
With GDAL "trunk" the following seems to do the trick, and could
be easily extended to loop over many files.
import gdal
def update_ct( file ):
ds = gdal.Open( file, gdal.GA_Update )
ct = ds.GetRasterBand(1).GetRasterColorTable()
ct.SetColorEntry( 123, (255,255,255) )
ds.GetRasterBand(1).SetRasterColorTable( ct )
ds = None
update_ct( 'test.tif' )
Best regards,
--
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up | Frank Warmerdam, [email protected]
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush | Geospatial Programmer for Rent
_______________________________________________
gdal-dev mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/gdal-dev