[GRASSLIST:2273] Re: Poor quality PNG file driver output
Jason Horn
jhorn at bu.edu
Mon Jan 19 00:36:36 EST 2004
Hamish,
Thanks again for the assistance. To answer your questions...
On Jan 18, 2004, at 9:49 PM, Hamish wrote:
>> 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.
>
> That is odd, it should be just a straight screen capture.
>
> Can you Aquire->Screenshot from Gimp or another graphics program?
>
> (install the gimp with 'Fink' [http://fink.sourceforge.net])
> * I assume you are running MacOSX ?
See the attached files.
1) GRASS_monitor screen capture of the GRASS monitor
2) png_driver.png produced by the PNG file driver
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.
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.
>
>
>> 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.
>
> see attached for instructions on building in OSX 10.3. If you are using
> 10.2, well that's a bit different. It's not too rough if everything
> works properly and you may learn something along the way..
>
>
>> 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 found these instructions on the web for building the gd libraries and
used them. http://www.paginar.net/matias/articles/gd_x_howto.html At
least I knew what was happening and where it was going.
>
>
>> However, I would try to compile it (and all the other
>> libraries that go with it) if I thought it would help.
>
> ... definite maybe.
>
>
>
>> 1) Why do you think re-compiling would help?
>
> Installing GD-2.0 by itself doesn't let GRASS know it is installed and
> GRASS should use it. This is figured out at the configure stage before
> compiling GRASS. There are just way too many places it could be for
> GRASS to look for it each time.
I'll give it a shot.
>
>
>> 2) If I do, which version should I compile?
>
> Depends on what you want/need.
> 5.0.3 most stable version
> 5.3 datum support, some new features; things may change without
> warning
> 5.7 vastly improved vector support; things may change without warning
I'll try 5.0.3 for now.
>
>
>> 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)?
>
> I think so... but that's just a guess.
>
>
>
> good luck,
> Hamish
>
> (install fink!)
> <compile_53_osx_panther.txt>
Thanks again! I'll let you know what happens.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: GRASS_monitor.png
Type: image/png
Size: 229012 bytes
Desc: not available
Url : http://lists.osgeo.org/pipermail/grass-user/attachments/20040119/054a23eb/GRASS_monitor.png
-------------- next part --------------
A non-text attachment was scrubbed...
Name: png_driver.png
Type: image/png
Size: 26850 bytes
Desc: not available
Url : http://lists.osgeo.org/pipermail/grass-user/attachments/20040119/054a23eb/png_driver.png
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pnmtopng.png
Type: image/png
Size: 126816 bytes
Desc: not available
Url : http://lists.osgeo.org/pipermail/grass-user/attachments/20040119/054a23eb/pnmtopng.png
-------------- next part --------------
A non-text attachment was scrubbed...
Name: xwdtopnm.pnm
Type: application/octet-stream
Size: 921615 bytes
Desc: not available
Url : http://lists.osgeo.org/pipermail/grass-user/attachments/20040119/054a23eb/xwdtopnm.obj
-------------- next part --------------
More information about the grass-user
mailing list