<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:times new roman,new york,times,serif;font-size:12pt"><div>Thanks for the reply. I wrote a short C program using libpng to accomplish the task. The projection information was lost but that's OK since all my images are EPSG 4326 (lat/long WGS84) as required for Google Earth KML. Extent information was preserved in the final png image which was a surprise.<br><br>Too bad KML doesn't support this because it would allow the user to change the color table on-the-fly to get better contrast in some weather features.<br><br><br></div><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;"><br><div style="font-family: arial,helvetica,sans-serif; font-size: 13px;"><font size="2" face="Tahoma"><hr size="1"><b><span style="font-weight: bold;">From:</span></b> Chris 'Xenon' Hanson <xenon@3dnature.com><br><b><span
style="font-weight: bold;">To:</span></b> Jeff Bullard <jeffbullard2000@yahoo.com>; "Geotiff@lists.maptools.org >> GeoTIFF Mailing List" <geotiff@lists.maptools.org><br><b><span style="font-weight: bold;">Sent:</span></b> Sunday, February 15, 2009 12:04:49 PM<br><b><span style="font-weight: bold;">Subject:</span></b> Re: [Geotiff] Geotiff List: Tool to convert 8-bit gray to RGBA using a custom color table?<br></font><br>
Jeff Bullard wrote:<br>> GeoTIFF list,<br>> I have weather data that is represented as an 8-bit GeoTIFF with one<br>> band (grayscale). I would like to use a color table to convert into<br>> RGBA for map display.<br>> Are there any existing tools to do this? I use a linux platform with<br>> FWTools for most of my work.<br>> Previously I used Mapserver and a mapfile to render single-band raster<br>> into a color map. Now I'm trying Google Earth API to display the same<br>> maps. I'm new at KML and have found no way to use KML to do simple<br>> color mapping that my current mapfiles perform, which is to render the<br>> grayscale into 6 shades of blue. I'm hoping to use some GDAL utility to<br>> convert the grayscale GeoTIFFs into RGBA using a color table stored in a<br>> file. I haven't found a way to do it.<br>> My other alternative is to write some code in C using libtiff
and/or<br>> libpng to perform the color operations. Before I get into that I want<br>> to ask the list f there is a simple way to do it using existing tools. <br><br> I don't think KML can do it. You might be able to do it with a combination of netpbm<br>(which I think can colorize a greyscale) and fwtools (to capture the metadata before<br>netpbm and reinsert it afterward).<br><br>> Thanks,<br>> Jeff Bullard<br><br><br>-- <br> Chris 'Xenon' Hanson | Xenon @ 3D Nature | <a href="http://www.3DNature.com/" target="_blank">http://www.3DNature.com/</a><br> "I set the wheels in motion, turn up all the machines, activate the programs,<br> and run behind the scenes. I set the clouds in motion, turn up light and sound,<br> activate the window, and watch the world go 'round." -Prime Mover, Rush.<br></div></div></div><br>
</body></html>