Skip to content

imgcodecs: tiff: to avoid using TIFFTAG_* directly for imwrite() params.#25255

Merged
asmorkalov merged 1 commit intoopencv:4.xfrom
Kumataro:refactor_imgcodec_tiff_add_imwrite_tiff
Mar 29, 2024
Merged

imgcodecs: tiff: to avoid using TIFFTAG_* directly for imwrite() params.#25255
asmorkalov merged 1 commit intoopencv:4.xfrom
Kumataro:refactor_imgcodec_tiff_add_imwrite_tiff

Conversation

@Kumataro
Copy link
Copy Markdown
Contributor

@Kumataro Kumataro commented Mar 23, 2024

Normaly, we set IMWRITE_* flags for imwrite() params. But imgcodecs expects to use some TIFFTAG_* directory. This patch introduce IMWRITE_TIFF_ROWSPERSTRIP and IMWRITE_TIFF_PREDICTOR instead of TIFFTAG_*.

Pull Request Readiness Checklist

See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request

  • I agree to contribute to the project under Apache 2 License.
  • 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
  • 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

Normaly, we sets IMWRITE_* flags for imwrite() params.
But imgcodecs expects to use some TIFFTAG_* directory.
This patch introduce IMWRITE_TIFF_ROWSPERSTRIP and
IMWRITE_TIFF_PREDICTOR instead of TIFFTAG_*.
@Kumataro
Copy link
Copy Markdown
Contributor Author

Accuracy test for DNN is failed,
However this fix will not be effects this test, so this result may be false-positive.

PR:4.x / macOS-ARM64-Vulkan / BuildAndTest (pull_request) Failing after 26m

2024-03-23T11:39:57.0582940Z [ RUN      ] Test_Caffe_layers.Concat/0, where GetParam() = VKCOM/VULKAN
2024-03-23T11:39:57.0751100Z /Users/opencv-cn/GHA-OCV-1/_work/opencv/opencv/opencv/modules/dnn/test/test_common.impl.hpp:76: Failure
2024-03-23T11:39:57.0753380Z Expected: (normL1) <= (l1), actual: nan vs 1e-05
2024-03-23T11:39:57.0754230Z   |ref| = 3.8162410259246826
2024-03-23T11:39:57.0755870Z [  FAILED  ] Test_Caffe_layers.Concat/0, where GetParam() = VKCOM/VULKAN (16 ms)

Copy link
Copy Markdown
Contributor

@asmorkalov asmorkalov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@asmorkalov asmorkalov merged commit 7b9de94 into opencv:4.x Mar 29, 2024
@asmorkalov asmorkalov self-assigned this Mar 29, 2024
@asmorkalov asmorkalov added this to the 4.10.0 milestone Mar 29, 2024
@asmorkalov asmorkalov mentioned this pull request Apr 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants