• Ilari Venäläinen's avatar
    Merge pull request #12989 from venalil:fix_thresholded_tiff_read · e6c41f0d
    Ilari Venäläinen authored
    * Fix reading of black-and-white (thresholded) TIFF images
    
    I recently updated my local OpenCV version to 3.4.3 and found out that
    I could not read my TIFF images related to my project. After debugging I
    found out that there has been some static analysis fixes made
    that accidentally have broken reading those black-and-white TIFF images.
    
    Commit hash in which reading of mentioned TIFF images has been broken:
    cbb1e867
    
    Basically the fix is to revert back to the same functionality that has been there before,
    when black-and-white images are read bpp (bitspersample) is 1.
    Without the case 1: this TiffDecoder::readHeader() function always return false.
    
    * Added type and default error message
    
    * Added stdexcept include
    
    * Use CV_Error instead of throw std::runtime_error
    
    * imgcodecs(test): add TIFF B/W decoding tests
    e6c41f0d
Name
Last commit
Last update
..
bitstrm.cpp Loading commit data...
bitstrm.hpp Loading commit data...
exif.cpp Loading commit data...
exif.hpp Loading commit data...
grfmt_base.cpp Loading commit data...
grfmt_base.hpp Loading commit data...
grfmt_bmp.cpp Loading commit data...
grfmt_bmp.hpp Loading commit data...
grfmt_exr.cpp Loading commit data...
grfmt_exr.hpp Loading commit data...
grfmt_gdal.cpp Loading commit data...
grfmt_gdal.hpp Loading commit data...
grfmt_gdcm.cpp Loading commit data...
grfmt_gdcm.hpp Loading commit data...
grfmt_hdr.cpp Loading commit data...
grfmt_hdr.hpp Loading commit data...
grfmt_jpeg.cpp Loading commit data...
grfmt_jpeg.hpp Loading commit data...
grfmt_jpeg2000.cpp Loading commit data...
grfmt_jpeg2000.hpp Loading commit data...
grfmt_pam.cpp Loading commit data...
grfmt_pam.hpp Loading commit data...
grfmt_png.cpp Loading commit data...
grfmt_png.hpp Loading commit data...
grfmt_pxm.cpp Loading commit data...
grfmt_pxm.hpp Loading commit data...
grfmt_sunras.cpp Loading commit data...
grfmt_sunras.hpp Loading commit data...
grfmt_tiff.cpp Loading commit data...
grfmt_tiff.hpp Loading commit data...
grfmt_webp.cpp Loading commit data...
grfmt_webp.hpp Loading commit data...
grfmts.hpp Loading commit data...
ios_conversions.mm Loading commit data...
loadsave.cpp Loading commit data...
precomp.hpp Loading commit data...
rgbe.cpp Loading commit data...
rgbe.hpp Loading commit data...
utils.cpp Loading commit data...
utils.hpp Loading commit data...