mirror of
https://github.com/opencv/opencv.git
synced 2024-11-29 05:29:54 +08:00
pass the correct rgb->gray coefficients to PNG decoder, to match cvtColor's.
This commit is contained in:
parent
d6686240d5
commit
beee6f2f70
@ -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 );
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user