Browse Source

Temporarily disabled zlib decompression for PNG images, in favour of LodePNG's built-in decompression code.

Alex Szpakowski 10 years ago
parent
commit
5138acaee5
1 changed files with 4 additions and 0 deletions
  1. 4 0
      src/modules/image/magpie/PNGHandler.cpp

+ 4 - 0
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.colortype = LCT_RGBA;
 	state.info_raw.bitdepth = 8;
 	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;
 	state.decoder.zlibsettings.custom_zlib = zlibDecompress;
+#endif
 
 
 	unsigned status = lodepng_decode(&img.data, &width, &height,
 	unsigned status = lodepng_decode(&img.data, &width, &height,
 	                                 &state, indata, insize);
 	                                 &state, indata, insize);