Changes between Version 21 and Version 22 of FAQRaster


Ignore:
Timestamp:
Jan 12, 2010, 3:01:57 PM (14 years ago)
Author:
maphew
Comment:

creating/editing color palettes

Legend:

Unmodified
Added
Removed
Modified
  • FAQRaster

    v21 v22  
    143143}}}
    144144
    145 .
     145
     146== Create or Edit Color Palette ==
     147
     148''What is the easiest way to create or edit a color table in an image?''
     149
     150The easiest non-scripting way to do this is to translate your file to VRT (XML) format, and edit the color table in the XML file. eg.
     151{{{
     152gdal_translate -of VRT your.tif your.vrt
     153}}}
     154edit `your.vrt` and modify the color table, see [http://www.gdal.org/gdal_vrttut.html Virtual Format Tutorial] for detailed syntax options. Then
     155{{{
     156gdal_translate your.vrt your_fixedup.tif
     157}}}
     158Note that the .vrt file doesn't actually include the image data, it just references back to your.tif (or other supported format).
     159
     160This general approach can be used to modify metadata, color tables, gcps and other things for which there is no easy to do set them with gdal_translate. There are other mechanisms to do this via scripting or c/c++ programming.
     161