[GRASS5] r.in.gdal and colors

Eric G. Miller egm2 at jps.net
Wed Feb 5 23:19:32 EST 2003


On Wed, Feb 05, 2003 at 10:30:51PM -0500, Frank Warmerdam wrote:

> Eric / Russell,
> 
> Do you or others who get the Zen of GRASS better than I think
> r.in.gdal ought to be writing a greyscale colortable for imported
> files without a colormap?  Should it only do this for multiband
> images?  Only for 8bit images?
> 
> I would be happy to make changes, but I don't want to imply color
> tables where they don't exist unless it is widely accepted as the
> correct thing to do.

Zen of GRASS?  I dunno, I think maybe GRASS should be changed to
assume min/max linear greyscale when no color table exists...
I vaguely recall some discussion about this the last time it
came up, but I don't recall if there was a resolution to change
GRASS.

Of course, min/max per band isn't really correct for RGB imagery
since it can skew the colors, but we can't assume 0-255 with 32-bit
ints.  The imagery groups can specify RGB bands, but that doesn't
come into play for d.rgb (i.composite uses the settings, but a 
colortable of 256*256*256 is unwieldy).  I don't know if there's a
perfect solution.  Using imagery groups is probably the correct route,
since the colortable semantics can be bypassed with a proper display
program (say, the unwritten d.image ...).

-- 
echo ">gra.fcw at 2ztr< eryyvZ .T pveR" | rot13 | reverse




More information about the grass-dev mailing list