Line
Link Here
|
0 |
-- src/highgui/grfmt_png.cpp |
0 |
++ src/highgui/grfmt_png.cpp |
Lines 223-229
Link Here
|
223 |
png_set_palette_to_rgb( png_ptr ); |
223 |
png_set_palette_to_rgb( png_ptr ); |
224 |
|
224 |
|
225 |
if( m_color_type == PNG_COLOR_TYPE_GRAY && m_bit_depth < 8 ) |
225 |
if( m_color_type == PNG_COLOR_TYPE_GRAY && m_bit_depth < 8 ) |
226 |
png_set_gray_1_2_4_to_8( png_ptr ); |
226 |
png_set_expand_gray_1_2_4_to_8( png_ptr ); |
227 |
|
227 |
|
228 |
if( CV_MAT_CN(m_type) > 1 && color ) |
228 |
if( CV_MAT_CN(m_type) > 1 && color ) |
229 |
png_set_bgr( png_ptr ); // convert RGB to BGR |
229 |
png_set_bgr( png_ptr ); // convert RGB to BGR |