[GRASSLIST:2272] Re: Poor quality PNG file driver output

Jason Horn jhorn at bu.edu
Sun Jan 18 20:18:24 EST 2004


Hamish,

Thanks so much for your response.  I found your scripts elsewhere on 
the web and have already had a go at using them.  The PNG script uses 
the same commands that I was referring to, so the output is the same.  
The xwd script works better, but the output is still NOT a match to 
what I see on the screen in the GRASS monitor.  The xwd output tends to 
dither areas of flat color, so that's not acceptable either.

As for re-compiling grass, I'm not sure if I could do it.  I am using 
5.0.2 off of the OpenOSX CD because I'm not an expert with UNIX.  It 
was a two-day ordeal for me to get the gd library compiled and running 
on my system.  However, I would try to compile it (and all the other 
libraries that go with it) if I thought it would help.  So, for Hamish, 
or anyone else who can help...

1) Why do you think re-compiling would help?  I wouldn't want to waste 
days on that endeavor if it wouldn't work.

2) If I do, which version should I compile?

3) Why do you think I'm getting the kind of poor quality from the PNG 
driver?  Am I correct in assuming that it's because I don't have the 
TRUECOLOR support from the gd library (even though it's now installed)?

Anyone's help would be appreciated.  I'm really stuck.

Thanks,

Jason


Jason Horn
Boston University Department of Biology
5 Cumington Street  Boston, MA 02891

jhorn at bu.edu
617 353 6975

On Jan 18, 2004, at 5:49 PM, Hamish wrote:

>> I'm having trouble outputting images from the PNG file driver - the
>> quality of the resulting .png images is very poor.  I put together the
>> maps that I want to output using:
>>
>> d.mon start=PNG
>> d.mon select=PNG
>> d.rast dem.relshade
>> d.mon stop=PNG
>>
>> This does NOT give me what I'd see in the grass monitor if I'd used
>> d.mon start=x0 instead of the PNG driver.  The colors in the image are
>> interpolated, not enough shades of grey, for instance, as if the color
>> palette was very small.  Lots of blotchy colors, and no smooth
>> transitions and  gradients.
>>
>> Markus, in your book you make the following reference on p. 187 in the
>> section 8.1.3 on "Monitor output to PNG and HTML files"
>>
>> "If the Gd2.x library is installed the driver supports true color
>> output"
>>
>> Because my images look like they don't have enough colors, I assumed
>> this was the problem.  So, I installed the gd  2.0.9 library and 
>> tested
>> it to make sure it was working.  I get the same poor quality images.  
>> I
>> AM setting the GRASS_TRUECOLOR=TRUE environment variable.
>>
>> What's going on here?  Why is the output from PNG file driver so
>> different from the output from the GRASS monitor?
>
>
> Did you recompile GRASS after installing GD 2.0?
>
>
> maybe one of the following two scripts will be helpful.
>
>
> Hamish
>
> <d.out.png.xwdump><d.out.png.driver>




More information about the grass-user mailing list