[GRASS5] r.in.png/r.out.png

Eric G . Miller egm2 at jps.net
Tue Nov 21 21:42:45 EST 2000


On Tue, Nov 21, 2000 at 11:44:01PM +0100, Andreas Lange wrote:
> Hi again,
> 
> i checked both programs. They do _not_ depend on the netpbm tools or the
> pbm library. 
> I can now recompile them on Cygwin with just adding the headers from the
> actual netbpm 9.8 distribution. 
> 
> So we could check in the header files within src/include. 
> 
> I changed a call to png_write_destroy(), this function is deprecated and
> should not be used any more. Perhaps this was another reason for core
> dumps.
> 
> But i found that the files written by r.out.png are _very_ big
> (r.out.png edges from the global dataset yields a file 29 MB big).
> Although the image consists only of white and blue pixels. This is IMHO
> not compressed at all (4500x2250x8bit x rgb ~ 29 MB). gzipped it shrinks
> down to less than 200k.

Haven't looked myself, but does the code specify a compression level
and/or bit packing for the png_lib?  Deflate compression (zlib) should
be built in and only needs to be specified at the beginning with a call
like:
	png_set_compression_level (png_ptr, Z_DEFAULT_COMPRESSION);

I just gleaned this from the libpng.txt file that came with the library
(I'd hardly claim to be an expert).

I'll be adding zlib.h/libz checks to the configure script and it will
define HAVE_ZLIB_H in src/include/config.h.  Actually, I already did
this and then found how the configure script has things *not* in
configure.in (Oooh, bad).  Ahh, I see zlib.h is already included in png.h.
Still, configure should check.

-- 
Eric G. Miller <egm2 at jps.net>

---------------------------------------- 
If you want to unsubscribe from GRASS Development Team mailing list write to:
minordomo at geog.uni-hannover.de with
subject 'unsubscribe grass5'



More information about the grass-dev mailing list