From 1f11ce6df2491e51c713278b6bfc6464a9aef965 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Thu, 6 Sep 2012 01:34:20 +0300 Subject: PNG: call png_set_interlace_handling() before calling png_read_update_info() This matches the documentation, information from the PNG bug tracker and the behavior of example decoders off the net. It fixes warnings thrown from the PNG decoder --- graphics/decoders/png.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'graphics/decoders') diff --git a/graphics/decoders/png.cpp b/graphics/decoders/png.cpp index bfaab6dc35..4f917b44b1 100644 --- a/graphics/decoders/png.cpp +++ b/graphics/decoders/png.cpp @@ -191,6 +191,7 @@ bool PNGDecoder::loadStream(Common::SeekableReadStream &stream) { } // After the transformations have been registered, the image data is read again. + png_set_interlace_handling(pngPtr); png_read_update_info(pngPtr, infoPtr); png_get_IHDR(pngPtr, infoPtr, &w, &h, &bitDepth, &colorType, NULL, NULL, NULL); width = w; -- cgit v1.2.3