1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-29 23:33:05 +04:00

Apply TIFFTAG_PREDICTOR option for LZW, DEFLATE and ADOBE_DEFLATE compression cases for smaller files.

This commit is contained in:
xiongzhen
2022-05-13 09:44:25 +03:00
committed by Alexander Smorkalov
parent 40d2904f3d
commit 2238ac7d59
2 changed files with 43 additions and 1 deletions
+1 -1
View File
@@ -901,7 +901,7 @@ bool TiffEncoder::writeLibTiff( const std::vector<Mat>& img_vec, const std::vect
CV_TIFF_CHECK_CALL(TIFFSetField(tif, TIFFTAG_SAMPLEFORMAT, depth >= CV_32F ? SAMPLEFORMAT_IEEEFP : SAMPLEFORMAT_UINT));
if (page_compression != COMPRESSION_NONE)
if (page_compression == COMPRESSION_LZW || page_compression == COMPRESSION_ADOBE_DEFLATE || page_compression == COMPRESSION_DEFLATE)
{
CV_TIFF_CHECK_CALL(TIFFSetField(tif, TIFFTAG_PREDICTOR, predictor));
}