[GRASS5] color in GRASS

Michael Barton michael.barton at asu.edu
Tue Mar 23 13:17:09 EST 2004


Somehow this is just not doing the trick--unless my eyes are deceiving 
me.

The PNG driver is creating a 44Kb image of the display while xwd is 
creating a 1.2 Mb image of the same display. The differences in color 
are clearly apparent. As a test, I am just looking at a greyscale 
shaded relief map. Will this look paletted as a 24bit PNG? The image 
created by xwd does not look paletted and closely matches the display 
monitor image.

Michael


On Tuesday, March 23, 2004, at 04:43  AM, Glynn Clements wrote:

>
> Michael Barton wrote:
>
>> How difficult is it to at least get 24bit color (or perhaps even get
>> wild with 32bit) to these output routines?
>
> For 24-bit colour, you need either the recent (GD-less) 5.3 PNG
> driver, or an older PNG driver which was built with GD 2.x. In either
> case, you need to use:
>
> 	export GRASS_TRUECOLOR=TRUE
>
> before starting the PNG driver. You will then get 32-bit PNG files: 8
> bits of each of red, green, blue and alpha. The alpha channel will be
> completely opaque, unless you also use:
>
> 	export GRASS_TRANSPARENT=TRUE
>
> in which case any pixels which aren't drawn will be transparent.
>
> I'm not sure what you mean by 32-bit colour. The term is sometimes
> used to refer to formats which have an alpha channel, but it can also
> refer to 24-bit data with 8 bits of padding so that pixels are aligned
> to word boundaries (for performance reasons).
>
> When referring to display depth (e.g. in the Display properties dialog
> on Windows), 32-bit corresponds to the latter, i.e. the extra 8 bits
> are just padding.
>
> -- 
> Glynn Clements <glynn.clements at virgin.net>
>
______________________________
Michael Barton, Professor & Curator
Department of Anthropology
Arizona State University
Tempe, AZ  85287-2402
USA

voice: 480-965-6262; fax: 480-965-7671




More information about the grass-dev mailing list