[GRASS-dev] postscript color output

Hamish hamish_nospam at yahoo.com
Thu Jul 6 03:03:39 EDT 2006


Hi,


ps.map (legends) output colors as

if(do_color)
  fprintf(PS.fp, "%.2f %.2f %.2f C\n", 
            (double)R/255., (double)G/255., (double)B/255.);
else {
  grey_color_val = (.3 * (double)R + .59 * (double)G 
                     + .11 * (double)B)/255.;
  fprintf(PS.fp, "%.2f setgray\n", grey_color_val);
}


"0.00" is only 100 levels; should these be changed to %.3f so none of
the 256 color resolution is lost?



Hamish




More information about the grass-dev mailing list