mirror of
https://github.com/opencv/opencv.git
synced 2026-11-09 18:04:29 -06:00
Adding IMWRITE_TIFF_COMPRESSION_LEVEL - #30165 For some compression schemes (DEFLATE, ZSTD), libtiff supports a TIFFTAG_ZIPQUALITY. This PR adds an IMWRITE_TIFF_COMPRESSION_LEVEL param to set it. - [x] I agree to contribute to the project under Apache 2 License. - [x] To the best of my knowledge, the proposed patch is not based on a code under GPL or another license that is incompatible with OpenCV - [X] The PR is proposed to the proper branch - [ ] There is a reference to the original bug report and related work - [ ] There is accuracy test, performance test and test data in opencv_extra repository, if applicable Patch to opencv_extra has the same branch name. - [ ] The feature is well documented and sample code can be built with the project CMake I don't know what kind of automatic tests could be relevant. I just checked that 1) the param is honoured 2) for some basic mats, level 1 gives lower compression than level 9 3) level -1 (default) gives a compression ratio between levels 1 and 9 (actually seems to be 6, as expected) But I am not sure that 2) and 3) are generally guaranteed by the compression scheme for any data, so is it relevant to make a test assert on that ?