The GRASS graphics drivers use color lookup tables (reserving about 15
colors for vector "overlays"). This means that images with more than
240 colors for a 256 color display can't fit all its colors into the
hardware lookup table. In order to display the image a 6x6x6 color cube
is loaded into the hardware color registers (ie fixed mode) and the
nearest color is used instead of the "true" color. If you have an image
with a grey scale color map, and that image has more than 240 colors
(eg 1-255), then you get 6 levels of grey. The only solution is to
rescale the image data into the range 1-240 and set a grey scale for
the rescaled image.
In response to:
|
|
|When displaying grayscale images in the XDRIVER `monitor', I can only
|get about 6 levels of gray. Changing the colormode with d.colormode
|has no effect. I also recompiled other versions of XDRIVER with
|alternate (provided) Clr_table.c routines and saw no difference.
|
|Is there no way get more than 6 grey levels in an X-window?
|(SunOS 4.1, openwindows 2.0)
|
|--
|Duane Wessels <duane@pallas.pnl.gov | dwessels@sandbox.kenn.wa.us>
|Pacific Northwest Laboratory, Richland, Washington +1 509 376-4461
|
|
|
|
|
---------------------------------------------------------------------
Michael Shapiro
U.S. Army CERL email: shapiro@zorro.cecer.army.mil
Environmental Division phone: (217) 352-6511 ext 526
P.O. Box 9005 fax: (217) 373-7222
Champaign, Ill. 61826-9005
---------------------------------------------------------------------