<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-3" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Hamish wrote:
<blockquote cite="mid:713278.71867.qm@web110014.mail.gq1.yahoo.com"
 type="cite">[...]
  <pre wrap="">
Luigi Ponti wrote:
  </pre>
  <blockquote type="cite">
    <pre wrap="">The SVN conversion script is something I have tried to figure out for
a while: great! It always challenges me to find ways to dynamically
generate raster color maps.

I have understood that the algorithm is able to scale a 0-255 color map
to the 0-65535 range; I am not sure how it could be adapted to scale to
any range of data. Questions:

    </pre>
  </blockquote>
</blockquote>
<blockquote cite="mid:713278.71867.qm@web110014.mail.gq1.yahoo.com"
 type="cite">
  <blockquote type="cite">
    <pre wrap="">[...]</pre>
  </blockquote>
</blockquote>
<br>
Thanks for the detailed description of your script. It keeps amazing me
how many things an awk script can do in a couple of lines.<br>
<br>
<blockquote cite="mid:713278.71867.qm@web110014.mail.gq1.yahoo.com"
 type="cite">
  <pre wrap=""></pre>
  <blockquote type="cite">
    <pre wrap="">The goal would be to develop a script which would take the
data range of any raster and scale a 0-255 color rule to it.
    </pre>
  </blockquote>
  <pre wrap=""><!---->
scale 0-255 to 0-100 and add a % sign. r.colors will do the rest.

r=
g=
b=
RULE="`echo $EIGHTBIT | awk '{print $1 / 2.55}'`% $r:$g:$b"

 -&gt; if $EIGHTBIT=255 then $RULE becomes "100% r:g:b"


  </pre>
</blockquote>
<br>
Really a good tip -- will implement it right away.<br>
<br>
Regards,<br>
<br>
Luigi<br>
</body>
</html>