<html>
<head>
<style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
</style>
</head>
<body class='hmmessage'>
Thanks a lot Even. I looked at the gdaldem doc and it seems it does some kind of blending to the image.<br>Unfortunately, I do not want to produce any extra information/distortion in the image; only associate ranges to colors. The ranges form a partition of the pixel values. So, no interpolation/blending is needed. Is gdaldem easy to change to do this?<br><br>With best regards.<br>Belaid Moa.<br><br><br>> From: even.rouault@mines-paris.org<br>> To: gdal-dev@lists.osgeo.org<br>> Subject: Re: [gdal-dev] Colored images from grayscale images.<br>> Date: Wed, 8 Jul 2009 20:02:07 +0200<br>> CC: belaid_moa@hotmail.com<br>> <br>> You might want to try gdaldem with the color-relief mode to associate RGB <br>> values to pixel values. See http://gdal.org/gdaldem.html.<br>> <br>> But this will not set metadata. Otherwise you might want to try MapServer if <br>> you want a nice looking map with a legend.<br>> <br>> Le Wednesday 08 July 2009 19:33:34 Belaid MOA, vous avez écrit :<br>> > Hi everyone,<br>> > Is there any easy way to do the following using C++ in GDAL: I have a<br>> > floating-point image and I'd like to associate arbitrary colors with ranges<br>> > of the pixel levels. For example: for the pixel values in [0,0.1) associate<br>> > red, for [0.1, 0.2) associated orange, for [0.2, 0.3) associate light blue,<br>> > for [0.3,0.4) associate dark blue, for [0.4, 0.5) associate green, etc. I<br>> > would like also to have this information available in the metadata or as<br>> > legend so that users know what the colors stand for when they view the<br>> > image.<br>> ><br>> > Thanks a lot in advance for any input.<br>> ><br>> > With best regards.<br>> > Belaid Moa.<br>> ><br>> ><br>> ><br>> > _________________________________________________________________<br>> > Create a cool, new character for your Windows Live™ Messenger.<br>> > http://go.microsoft.com/?linkid=9656621<br>> <br>> <br><br /><hr />Attention all humans. We are your photos. <a href='http://go.microsoft.com/?linkid=9666044' target='_new'>Free us.</a></body>
</html>