[Gdal-dev] Best way to load a color palette

Jose Luis Gomez Dans josegomez at gmx.net
Fri Aug 10 08:56:00 EDT 2007


Hi,
I have processed a number of single band GeoTIFF images into GIFs (using -scale and -ot Byte to ensure that I have 255 grey levels in the output image, as the original GeoTIFFs are floats). I have another PNG file with a colour map I like (8 bit and so on), and I would like to stick it to my original GIF files. From what I read, the only way to do this (in Python) is to create a copy of my original file, apply the new palette (open the PNG file, read in the palette) to the new file, read the data in. As I understand it, there is no way to just stick said colour table to a given image without creating a copy using GDAL. 

I have also tried using Image Magick's convert -map, but the images have funny colours.

Any hints on the best recommended practice? :)
Thanks!
Jose
-- 
GMX FreeMail: 1 GB Postfach, 5 E-Mail-Adressen, 10 Free SMS.
Alle Infos und kostenlose Anmeldung: http://www.gmx.net/de/go/freemail



More information about the Gdal-dev mailing list