From b2bedef26fd917da3e3a1051a03138b511b4924e Mon Sep 17 00:00:00 2001 From: Gabe Schwartz Date: Thu, 29 Aug 2013 14:32:50 -0400 Subject: [PATCH] Added interlace handling to PNG decoder. libpng 1.5+ recommends a call to png_set_interlace_handling() if you use png_read_update_info and png_read_image. It will generate a warning without it. --- modules/highgui/src/grfmt_png.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/highgui/src/grfmt_png.cpp b/modules/highgui/src/grfmt_png.cpp index 41bd58e80..bbbfb94fa 100644 --- a/modules/highgui/src/grfmt_png.cpp +++ b/modules/highgui/src/grfmt_png.cpp @@ -277,6 +277,7 @@ bool PngDecoder::readData( Mat& img ) else png_set_rgb_to_gray( png_ptr, 1, 0.299, 0.587 ); // RGB->Gray + png_set_interlace_handling( png_ptr ); png_read_update_info( png_ptr, info_ptr ); for( y = 0; y < m_height; y++ )