From 48b2515e7b6b8a619b17e3a5b76bc629e75226c0 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Wed, 28 Aug 2013 14:08:30 +0200 Subject: change zlib compression strategy --- cqrlogo.c | 5 +++++ 1 file changed, 5 insertions(+) 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; -- cgit v1.2.3-70-g09d2