fix inversed grayscale conditional
This commit is contained in:
parent
1b5352688f
commit
bdb9cf4d47
@ -266,7 +266,7 @@ bool PngDecoder::readData( Mat& img )
|
||||
if( m_color_type == PNG_COLOR_TYPE_PALETTE )
|
||||
png_set_palette_to_rgb( png_ptr );
|
||||
|
||||
if( (m_color_type & PNG_COLOR_MASK_COLOR) != 0 && m_bit_depth < 8 )
|
||||
if( (m_color_type & PNG_COLOR_MASK_COLOR) == 0 && m_bit_depth < 8 )
|
||||
#if (PNG_LIBPNG_VER_MAJOR*10000 + PNG_LIBPNG_VER_MINOR*100 + PNG_LIBPNG_VER_RELEASE >= 10209) || \
|
||||
(PNG_LIBPNG_VER_MAJOR == 1 && PNG_LIBPNG_VER_MINOR == 0 && PNG_LIBPNG_VER_RELEASE >= 18)
|
||||
png_set_expand_gray_1_2_4_to_8( png_ptr );
|
||||
|
Loading…
x
Reference in New Issue
Block a user