Allow TIFF min=white PHOTOMETRIC interpretation images to be read unchanged
authorsaskatchewancatch <saskatchewancatch@gmail.com>
Wed, 6 Sep 2017 03:43:33 +0000 (21:43 -0600)
committerGitHub <noreply@github.com>
Wed, 6 Sep 2017 03:43:33 +0000 (21:43 -0600)
modules/imgcodecs/src/grfmt_tiff.cpp

index 2760aef..61f4c64 100644 (file)
@@ -235,7 +235,7 @@ bool TiffDecoder::readHeader()
             m_hdr = false;
 
             if( bpp > 8 &&
-               ((photometric != 2 && photometric != 1) ||
+               ((photometric > 2) ||
                 (ncn != 1 && ncn != 3 && ncn != 4)))
                 bpp = 8;