<HTML>
<HEAD>
<TITLE>cause for bad colors in output from png driver</TITLE>
</HEAD>
<BODY>
<FONT FACE="Verdana, Helvetica, Arial"><SPAN STYLE='font-size:12.0px'>Glynn,<BR>
<BR>
I finally isolated the cause of the color issue I&#8217;m having with the PNG driver.<BR>
<BR>
It is the GRASS_TRUECOLOR setting.<BR>
<BR>
If this is set to false, then the PNG looks fine, except that it uses a limited color pallet. If it is set to true, the PNG has black where it should be white and other issues.<BR>
<BR>
</SPAN></FONT><FONT SIZE="2"><FONT FACE="Monaco, Courier New"><SPAN STYLE='font-size:10.0px'><BR>
GRASS_PNG_AUTO_WRITE=TRUE<BR>
export GRASS_PNG_AUTO_WRITE<BR>
GRASS_RENDER_IMMEDIATE=TRUE<BR>
export GRASS_RENDER_IMMEDIATE<BR>
GRASS_TRUECOLOR=TRUE<BR>
export GRASS_TRUECOLOR<BR>
GRASS_PNGFILE=map.png<BR>
export GRASS_PNGFILE<BR>
<BR>
GRASS 6.3.cvs (spearfish60_test):~ &gt; d.barscale tcolor=green<BR>
PNG: GRASS_TRUECOLOR status: TRUE<BR>
PNG: collecting to file: /Users/cmbarton/map.png,<BR>
GRASS_WIDTH=640, GRASS_HEIGHT=480<BR>
WARNING: Color: can't set color -256<BR>
<BR>
This gives a black background to the barscale<BR>
<BR>
GRASS 6.3.cvs (spearfish60_test):~ &gt; d.legend elevation.10m <BR>
PNG: GRASS_TRUECOLOR status: TRUE<BR>
PNG: collecting to file: /Users/cmbarton/map.png,<BR>
GRASS_WIDTH=640, GRASS_HEIGHT=480<BR>
WARNING: Color: can't set color -256<BR>
WARNING: Color: can't set color -16843264<BR>
WARNING: Color: can't set color -33686272<BR>
WARNING: Color: can't set color -50529280<BR>
WARNING: Color: can't set color -50529280<BR>
...<BR>
A lot more of these errors. This is what is locking up the wxPython overlay routine<BR>
<BR>
If I set GRASS_TRUECOLOR=FALSE, I get no errors, d.barscale is correct, but of course the FP colors in d.legend do not display properly.<BR>
<BR>
Michael<BR>
</SPAN></FONT></FONT><FONT FACE="Verdana, Helvetica, Arial"><SPAN STYLE='font-size:12.0px'>__________________________________________<BR>
Michael Barton, Professor of Anthropology<BR>
School of Human Evolution &amp; Social Change &nbsp;&nbsp;&nbsp;<BR>
Center for Social Dynamics and Complexity<BR>
Arizona State University<BR>
<BR>
phone: 480-965-6213<BR>
fax: 480-965-7671<BR>
www: <a href="http://www.public.asu.edu/~cmbarton">http://www.public.asu.edu/~cmbarton</a> <BR>
</SPAN></FONT>
</BODY>
</HTML>