Skip to content

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

Closed

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.

Activity

  1. dkurt commented on Jul 26, 2019

    @dkurt
    Member

    @ksivaman, Feel free to propose a PR which will describe imwrite return value.

  2. added
    category: documentation
    on Jul 26, 2019
  3. heisenbuug commented on Oct 25, 2019

    @heisenbuug

    @dkurt can I work on this issue?

  4. added
    Hackathon
    on Jan 31, 2020
  5. vpisarev commented on Feb 3, 2020

    @vpisarev
    Contributor

    @heisenbuug, if you still work on this issue, this is a good moment :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Hackathoncategory: documentation

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions