[Gdal-dev] Change indicated colour maps into gray gradient

shortyII sschantz at bfs.de
Wed Sep 12 03:10:37 EDT 2007


Hi,

Is it possible to use GDAL to change a GeoTIFF from
indicated colour to a gray gradient?

I've looked at doc and e-mail archives for several hours but I haven't
found anything yet - hoping someone can spend 30 seconds on the answer!

My GeoTiff looks like this:
E:\test\Tiff\original>gdalinfo dtk1000.tif
Driver: GTiff/GeoTIFF
Files: dtk1000.tif
Size is 22346, 29568
Coordinate System is `'
Origin = (32256531.250000000000000,6124843.750000000000000)
Pixel Size = (31.250000000000000,-31.250000000000000)
Metadata:
  TIFFTAG_SOFTWARE=Handmade Software, Inc. Image Alchemy v1.12
  TIFFTAG_XRESOLUTION=813
  TIFFTAG_YRESOLUTION=813
  TIFFTAG_RESOLUTIONUNIT=2 (pixels/inch)
Image Structure Metadata:
  COMPRESSION=LZW
Corner Coordinates:
Upper Left  (32256531.250, 6124843.750)
Lower Left  (32256531.250, 5200843.750)
Upper Right (32954843.750, 6124843.750)
Lower Right (32954843.750, 5200843.750)
Center      (32605687.500, 5662843.750)
Band 1 Block=22346x1 Type=Byte, ColorInterp=Palette
  Color Table (RGB with 256 entries)
    0: 255,255,255,255
    1: 255,255,255,255
    2: 255,255,255,255
    3: 191,230,230,255
    4: 153,255,179,255
    5: 230,255,204,255
    6: 191,242,128,255
    7: 230,230,204,255
    8: 255,255,230,255
    9: 191,255,255,255
   10: 204,204,204,255
   11: 255,153,179,255
   12: 255,77,128,255
   13: 255,255,255,255
   14: 255,255,255,255
   15: 255,255,255,255
   16: 255,255,255,255
   17: 242,204,202,255
   18: 255,120,255,255
   19: 255,255,255,255
   20: 102,102,102,255
   21: 255,255,0,255
   22: 255,179,0,255
   23: 255,255,255,255
   24: 255,0,0,255
   25: 153,0,255,255
...

-- 
View this message in context: http://www.nabble.com/Change-indicated-colour-maps-into-gray-gradient-tf4427397.html#a12629889
Sent from the GDAL - Dev mailing list archive at Nabble.com.




More information about the Gdal-dev mailing list