news at max.cecer.army.mil
Sat Mar 6 23:54:14 EST 1993
From: shapiro at zorro.cecer.army.mil (Michael Shapiro)
Subject: Re: reading in a SPOT image
Message-ID: <C3I5MD.8yD at news.cecer.army.mil>
Sender: news at news.cecer.army.mil (Net.Noise owner)
Organization: US Army Corps of Engineers Construction Engineering Research Labs
References: <9302232107.AA08927 at cast.uark.edu>
Date: Sun, 7 Mar 1993 04:54:13 GMT
In <9302232107.AA08927 at cast.uark.edu> wang at cast.uark.edu (Wang Song) writes:
>> I'm having problems reading a (panchromatic) spot image into grass.
>> Here is what I did: I created a x,y coordinate location and set the default
>> window so that it matches the size of the image. I placed the image file
>> in the cell directory and ran r.support to create additional support files
>> (header, cats, and colr). The problem I'm having is that whenever I try to
>> display the image I get an error message saying can't set color 256, and
>> when I try to use d.colors it tells me "filename" has more colors than the
>> graphics device, though I'm using a 24 bit color monitor. I can't change
>> the colors interactively. Why?
>> Thanks, Magaly
The error message is a bug in the driver. Get the new XDRIVER.
Also, the XDRIVER doens't work with 24 bit visuals. You have to
set your Xserver to use a PseudoColor visual as the default. And
if you want to use d.colors you have to have a map with under 240
colors since GRASS reserves about 16 for vector colors, so that leaves
240 (256-16). If you map has more than this max (~240) colormode
float makes no sense since there aren't enough color registers available
to give each color in the map its own register in the graphics lookup table.
You can still use d.colors to modify the color table, but it cna't show
you the changes until you redisplay the map (using d.rast).
Michael Shapiro U.S. Army CERL
More information about the grass-user