Here related details:
cd grass57/display/drivers/PNG/
grep GRASS_PNG_COMPRESSION *
description.html: <LI><B>GRASS_PNG_COMPRESSION=[0|1|9]</B><BR>
write.c: str = getenv("GRASS_PNG_COMPRESSION");
grep PNG_COMPRESSION_TYPE_DEFAULT *
write.c: PNG_COMPRESSION_TYPE_DEFAULT,
grep PNG_COMPRESSION_TYPE_DEFAULT /usr/include/png.h
#define PNG_COMPRESSION_TYPE_DEFAULT PNG_COMPRESSION_TYPE_BASE
grep PNG_COMPRESSION_TYPE_BASE /usr/include/png.h
png_byte compression_type; /* must be PNG_COMPRESSION_TYPE_BASE (IHDR) */
#define PNG_COMPRESSION_TYPE_BASE 0 /* Deflate method 8, 32K window */
#define PNG_COMPRESSION_TYPE_DEFAULT PNG_COMPRESSION_TYPE_BASE
... still no idea what to add to the HTML page.
Markus
-------------------------------------------- Managed by Request Tracker
Markus Neteler via RT wrote:
Here related details:
cd grass57/display/drivers/PNG/
grep GRASS_PNG_COMPRESSION *
description.html: <LI><B>GRASS_PNG_COMPRESSION=[0|1|9]</B><BR>
write.c: str = getenv("GRASS_PNG_COMPRESSION");
[snip]
... still no idea what to add to the HTML page.
The GRASS_PNG_COMPRESSION environment variable determines the level of
compression, with 0 being no compression and 9 being maximum
compression. If unset, the PNG library's default compression level
will be used.
The documentation for that function in png.h says:
/* Set the library compression level. Currently, valid values range from
* 0 - 9, corresponding directly to the zlib compression levels 0 - 9
* (0 - no compression, 9 - "maximal" compression). Note that tests have
* shown that zlib compression levels 3-6 usually perform as well as level 9
* for PNG images, and do considerably fewer caclulations. In the future,
* these values may not correspond directly to the zlib compression levels.
*/
extern PNG_EXPORT(void,png_set_compression_level) PNGARG((png_structp png_ptr,
int level));
Note: the PNG_COMPRESSION_TYPE_* stuff isn't relevant. It's present in
write.c because one of the required parameters to png_set_IHDR() is
the compression type, but PNG only actually understands one
compression type.
--
Glynn Clements <glynn@gclements.plus.com>