[Gdal-dev] Changing a color in palette

Frank Warmerdam warmerdam at pobox.com
Fri Jan 23 16:43:24 EST 2009


darrepac wrote:
> Hello
> 
> I have a set of geotiff 8bits file.
> I would like to change 1 color of the palette: puting the color 255,255,255
> in the index 123 instead of color  255,0,255. While not touching anything
> else.
> 
> Is there a way to do this? because I have a big set of files and I did not
> find any tool which permit batch processing and keep the geo information.

Darre,

It should be quite practical to do this with a small python script, but, you
may need to use the trunk version of GDAL to get this functionality.  There
was recently a bunch of work done to support more dynamic altering of tiff
colormaps that you might require.

I could provide a sample script to do this if you are interested.

Best regards,
-- 
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | Geospatial Programmer for Rent



More information about the gdal-dev mailing list