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

Hamish hamish_nospam at yahoo.com
Mon Jan 19 01:41:51 EST 2004


just to note

> 1) GRASS_monitor    screen capture of the GRASS monitor

24-bit TrueColor image

> 2) png_driver.png     produced by the PNG file driver

256 colour indexed image

> 3) xwdtopnm.pnm     produced by the first step in your xwd script.  
> This image is perfect and matches the original GRASS monitor contents.
>  
> So far so good.

24-bit TrueColor image

[sending 1mb files to everyone on the mailing list isn't the best idea, btw]

> 4) pnmtopng.png     produced by the second step in the xwd script.  
> This is the output of pnmtopng with no options specified.  I mentioned
> 
> before that I saw dithering, but I realized that it was the viewer
> that I was using (Preview), not the file itself.  Oddly enough, this
> image looks fine when viewed in apps like Photoshop or
> GaphicConverter.  It looks poor in Preview and in Mail.  Either there
> must be something up with PNG files and OS X's quartz layer, or
> there's something strange with the image.  Either way,  this image
> looks like the GRASS Monitor, so this is the method I'll use.

24-bit Grayscale image



maybe the pnmtopng program is being smart & sees that the image has no
colour and thus creates a smaller grayscale PNG image.

If the 24bit TrueColor .pnm file looks good in "Preview", and the 24bit
GrayScale .png doesn't, I'd say it was a "Preview" issue..


tip:
try setting GRASS_WIDTH= and GRASS_HEIGHT= on the command line to get
rid of those black bands on the side.


> >> It was a two-day ordeal for me to get the gd library compiled and
> >> running on my system.
> >
> > I take it you didn't install gd via fink?
> > http://fink.sourceforge.net/pdb/package.php/gd2
> > 'apt-get install gd2' would have done it....
> 
> I tried this, but there were problems with 10.3 and fink.  Fink still 
> tries to install xfree86, even though you have Apple's X11 installed. 
> 
> So you have to trick it by installing the Apple X11 sdk and change a 
> few other things, bla, bla bla.  Plus there are other errors generated
> during building.  I couldn't verify that I was getting a good install.
>  

I don't know if I'd call that tricking it, but ok. I installed Apple's
X11, X11 SDK, & Developer's Tools before I tried Fink on OSX 10.3.
And then Fink worked the first time.. shrug


> > good luck,
> > Hamish




More information about the grass-user mailing list