Skip to content

cv2.imwrite does not report error if user does not have permission to write to a directory #15155

@ksivaman

Description

@ksivaman
System information (version)
  • OpenCV => 3.*
  • Operating System / Platform => Windows x64
Detailed description

In python 3.6.8 using the cv2 library, when using cv2.imwrite as:

cv2.imwrite('path/to/image/myi_image.jpg', my_image)

cv2 does not report an error if the user running the script does not have write permissions to the directory '/path/to/image' as in the above code segment.

imwrite just returns false and the error is extremely hard to debug due to no stderr output.

In addition, the existence of the directory is also not validated.

Metadata

Metadata

Assignees

Labels

Hackathonhttps://opencv.org/opencv-hackathon-starts-next-week/category: documentationDocumentation fix or update

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions