Commit beee6f2f authored by Vadim Pisarevsky's avatar Vadim Pisarevsky

pass the correct rgb->gray coefficients to PNG decoder, to match cvtColor's.

parent d6686240
......@@ -230,7 +230,7 @@ bool PngDecoder::readData( Mat& img )
else if( color )
png_set_gray_to_rgb( png_ptr ); // Gray->RGB
else
png_set_rgb_to_gray( png_ptr, 1, -1, -1 ); // RGB->Gray
png_set_rgb_to_gray( png_ptr, 1, 0.299, 0.587 ); // RGB->Gray
png_read_update_info( png_ptr, info_ptr );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment