From 5138acaee5d5527ee34ee58bbcfcad35e4ee94f8 Mon Sep 17 00:00:00 2001 From: Alex Szpakowski Date: Thu, 19 Mar 2015 14:41:15 -0300 Subject: [PATCH] Temporarily disabled zlib decompression for PNG images, in favour of LodePNG's built-in decompression code. --- src/modules/image/magpie/PNGHandler.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/modules/image/magpie/PNGHandler.cpp b/src/modules/image/magpie/PNGHandler.cpp index a8cc2e7c2..f809e15aa 100644 --- a/src/modules/image/magpie/PNGHandler.cpp +++ b/src/modules/image/magpie/PNGHandler.cpp @@ -152,7 +152,11 @@ PNGHandler::DecodedImage PNGHandler::decode(love::filesystem::FileData *fdata) state.info_raw.colortype = LCT_RGBA; state.info_raw.bitdepth = 8; +#if 0 + // FIXME: temporarily disabled: using this makes decoded images use more + // memory than they should and seems to potentially cause memory leaks. state.decoder.zlibsettings.custom_zlib = zlibDecompress; +#endif unsigned status = lodepng_decode(&img.data, &width, &height, &state, indata, insize);