GRASS color tables

Michael Shapiro shapiro at zorro.cecer.army.mil
Tue Jul 7 09:44:03 EDT 1992


GRASS color tables are NOT generated with any knowledge about the
display  device.  The  number  of  colors in the color tables for
raster maps depends only on the the number of categories  in  the
raster map.

Image processing in GRASS does not treat the  "image"  files  any
differently  than raster maps. To create a color composite from 3
bands of R,G,B, GRASS has to make a raster "map" to which it  can
assign  colors  that give a reasonable appearance when displayed.
The color composite routines is GRASS (i.composite, i.median) use
a  color  cube  with  6  levels  of  red,  green and blue (ie 216
colors).  The resultant "image" is a "map" with this  color  cube
as  the  color  file  and  categories assign to match the nearest
color in the cube.

Also, GRASS display capabilites only assume the  display  devices
use  lookup  tables, not 24 bit RGB planes etc. The current GRASS
drivers have no protocol for using 24 bit displays as  they  were
intended  to  be  used.   When GRASS is fully converted to use X-
windows hopefully this will change.

|I'm using an 8-bit display to view our raster data. I've examined the
|support files that reside under $GISBASE/colr and colr2 to find that
|the number of categories/colors in these files never exceeds 215
|(why isn't this max. value = 256?).
|
|I would like to know how colortable information is stored and 8
|bit information differentiated from 24 bit. Would the number of
|colors stored be any different if we were using a 24-bit device?
|How is the colormode setting (fixed vs. float) affecting the way
|these data are communicated to the hardware?
|


Michael



More information about the grass-user mailing list