[Gdal-dev] Reducing geotiff colors to a standard LUT

Jed O. Kaplan jed.kaplan at ips.unibe.ch
Tue Jul 4 17:52:45 EDT 2006


Hello all,

I have a series of geotiff files that are 8-bit paletted pseudocolor  
images. Unfortunately each separate image file has a different color  
table, though they are a sort of DRGs so the original scans have  
approximately all the same colors.

I would like to convert all the images to have a standard color  
table, so that, e.g., I can merge the files into a single image,  
perform GIS operations, etc.

Is there any way using GDAL tools or the API that I can give all of  
my individual images the same color table?  The image files are large  
(ca. 2000x3000 pixels), but I can convert them temporarily to full  
color rgb images and then reduce the colors.  I have a standard color  
table in another geotiff file.

I have tried to do this using the imagemagick tool: convert -map  
<file> <infile> <outfile> but this process is impossibly slow.

Any suggestions for (standardized, semi-automated) color reduction  
for DRG's would be much appreciated.

Thanks,

Jed Kaplan



More information about the Gdal-dev mailing list