David Strip <gdal <at> stripfamily.net> writes:

> 
> I have a paletted geotiff that I want to modify by mapping palette 
> entries to a new palette.
> Thus, I have an input palette, an output palette, and a geotiff.  I have 
> a mapping (many to 1, if it matters) from the input palette to the 
> output palette. Each pixel in the output geotiff will have a value 
> equivalent to mapping the input geotiff's pixel value through the map.
> 
> I've looked over the utilities and none seems to have this capability. 
> It would be pretty easy, I think to write code using gdal to do this, 
> but if one of the utilities will handle this case, that's even better.
> 
> Thanks.

Hi,

Try gdal_translate. Write your paletted image into .vrt file, open and edit
the palette with text editor and convert the modified .vrt file into a new
geotiff.

rgb2pct.py utility http://www.gdal.org/rgb2pct.html is doing kind of similar
thing with the -pct option.

-Jukka Rahkonen-
 




_______________________________________________
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev

Reply via email to