[GRASS-dev] Re: [GRASSGUI] something squirrelly with the PNG/PPM driver

Glynn Clements glynn at gclements.plus.com
Tue May 8 11:56:36 EDT 2007

Michael Barton wrote:

> Here are all the standard settings from the TclTk and wxPython GUI (from
> TclTk syntax here)
>     set env(GRASS_WIDTH) "$driver_w($mon)"
>     set env(GRASS_HEIGHT) "$driver_h($mon)"
>     set env(GRASS_PNGFILE) "$mapfile($mon)"
>     set env(GRASS_BACKGROUNDCOLOR) "ffffff"
>     set env(GRASS_PNG_AUTO_WRITE) "TRUE"
>     set env(GRASS_TRUECOLOR) "TRUE"
> Add a barscale or legend (try a legend for elevation.10m from Spearfish) to
> the GUI layer tree and render. Do you get correct colors?

The following produces the same colours as XDRIVER:

	GRASS_PNGFILE=map.ppm \
	d.legend elevation.10m

> I had updated, did a distclean, and compiled on Friday. Colors are not
> rendering correctly, and I'm getting partial rendering in some cases. I can
> look in the tmp directory where this stuff is getting rendered and check the
> PPM (and PNG files in wxPython) and can see the colors problem in the
> graphic file.
> This is only happening when writing to the PNG (PPM) driver. Using the X
> driver gives no problem. Oddly, maps seem OK, but scalebars and legends are
> a problem. I suppose that the problem could be something that d.barscale and
> d.legend are both using, but that maps are not.
> It could be specific to my office workstation (Mac G5, OS X 4.9). If so,
> I'll update and recompile. But I want to check to see if this is happening
> to anyone else.

Not to me.

So far as any futher tests are concerned, execute any commands
manually, in order to eliminate the GUI as a source of potential

Glynn Clements <glynn at gclements.plus.com>

More information about the grass-dev mailing list