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.
pull/1371/head
Gabe Schwartz 11 years ago
parent e2441e0034
commit b2bedef26f
  1. 1
      modules/highgui/src/grfmt_png.cpp

@ -277,6 +277,7 @@ bool PngDecoder::readData( Mat& img )
else else
png_set_rgb_to_gray( png_ptr, 1, 0.299, 0.587 ); // RGB->Gray 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 ); png_read_update_info( png_ptr, info_ptr );
for( y = 0; y < m_height; y++ ) for( y = 0; y < m_height; y++ )

Loading…
Cancel
Save