-
-
Notifications
You must be signed in to change notification settings - Fork 56.5k
imwrite: multi-image tiff from python #18525
Copy link
Copy link
Closed
Milestone
Description
System information (version)
- OpenCV => 4.4
- Operating System / Platform => Linux
- Compiler => GCC
Detailed description
imwrite supports writing multi-page tiffs by checking whether InputArray is a MatVector
opencv/modules/imgcodecs/src/loadsave.cpp
Lines 755 to 757 in 793b2b9
| std::vector<Mat> img_vec; | |
| if (_img.isMatVector() || _img.isUMatVector()) | |
| _img.getMatVector(img_vec); |
However, on python it can never be done as the binding generator does not try creating vector_Mat for InputArray - just Mat and UMat.
Steps to reproduce
import cv2
img = cv2.imread("doc/opencv-logo.png")
cv2.imwrite("multi.tiff", [img, img, img])Issue submission checklist
- I report the issue, it's not a question
- I checked the problem with documentation, FAQ, open issues,
answers.opencv.org, Stack Overflow, etc and have not found solution - I updated to latest OpenCV version and the issue is still there
- There is reproducer code and related data files: videos, images, onnx, etc
Reactions are currently unavailable