summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Christian Hesse <mail@eworm.de>2013-07-09 21:32:51 +0200
committerGravatar Christian Hesse <mail@eworm.de>2013-07-09 21:32:51 +0200
commitd0b6d52bc46a054ecff777f9ed226faca48c0551 (patch)
tree2cdcd72bf18be03f98187b3aa767d7714a39118e
parent34209651d4570cf717be4f9d7b28b22b06c2ded5 (diff)
downloadcqrlogo-d0b6d52bc46a054ecff777f9ed226faca48c0551.tar.gz
cqrlogo-d0b6d52bc46a054ecff777f9ed226faca48c0551.tar.zst
use best compression level
-rw-r--r--cqrlogo.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/cqrlogo.c b/cqrlogo.c
index 3b243c5..a9a4a5e 100644
--- a/cqrlogo.c
+++ b/cqrlogo.c
@@ -12,6 +12,7 @@
#include <regex.h>
#include <png.h>
+#include <zlib.h>
#include <qrencode.h>
#include "config.h"
@@ -42,6 +43,8 @@ int generate_png (struct bitmap_t *bitmap, char *http_referer) {
png_set_IHDR (png_ptr, info_ptr, bitmap->width, bitmap->height, depth,
PNG_COLOR_TYPE_GRAY, PNG_INTERLACE_NONE, PNG_COMPRESSION_TYPE_DEFAULT, PNG_FILTER_TYPE_DEFAULT);
+ png_set_compression_level(png_ptr, Z_BEST_COMPRESSION);
+
#ifdef PNG_TEXT_SUPPORTED
png_text text[3];