aboutsummaryrefslogtreecommitdiffstats
path: root/cqrlogo.c
diff options
context:
space:
mode:
authorGravatar Christian Hesse <mail@eworm.de>2013-08-28 14:08:30 +0200
committerGravatar Christian Hesse <mail@eworm.de>2013-08-28 14:08:30 +0200
commit48b2515e7b6b8a619b17e3a5b76bc629e75226c0 (patch)
tree8ef8435a2ecff3b21b54fb1f482e9e95342e8106 /cqrlogo.c
parent5a12f7a502f0b3b3bfbae24b75a0d53e72c53d0e (diff)
downloadcqrlogo-48b2515e7b6b8a619b17e3a5b76bc629e75226c0.tar.gz
cqrlogo-48b2515e7b6b8a619b17e3a5b76bc629e75226c0.tar.zst
change zlib compression strategy
Diffstat (limited to 'cqrlogo.c')
-rw-r--r--cqrlogo.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/cqrlogo.c b/cqrlogo.c
index 9ebad37..a72fd2b 100644
--- a/cqrlogo.c
+++ b/cqrlogo.c
@@ -61,8 +61,13 @@ int generate_png (struct bitmap_t *bitmap, const char *uri) {
png_set_IHDR (png_ptr, info_ptr, bitmap->width, bitmap->height, 1 /* depth */,
PNG_COLOR_TYPE_GRAY, PNG_INTERLACE_NONE, PNG_COMPRESSION_TYPE_DEFAULT, PNG_FILTER_TYPE_DEFAULT);
+ /* use best compression */
png_set_compression_level(png_ptr, Z_BEST_COMPRESSION);
+ /* use compression strategy filtered
+ * this way pngcrush can not optimize any more */
+ png_set_compression_strategy(png_ptr, Z_FILTERED);
+
#if defined PNG_TEXT_SUPPORTED && PNG_ENABLE_TEXT
unsigned int textcount = 0;
png_text *pngtext = NULL;