You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
save_image() uses the "png" extension by default for non-string fp param. It should be an error instead, because otherwise it can lead to unexpected image conversions.
Potential fix:
ifisinstance(dst, IOBase):
ifnotext:
raiseValueError("Image extension must be specified")
else:
# NOTE: Check destination path for existence# OpenCV silently fails if target directory does not existdst_dir=osp.dirname(dst)
ifdst_dir:
ifcreate_dir:
os.makedirs(dst_dir, exist_ok=True)
elifnotosp.isdir(dst_dir):
raiseFileNotFoundError("Directory does not exist: '%s'"%dst_dir)
# file extension and actual encoding can differext=extifextelseosp.splitext(dst)[1]
save_image() doesn't support crypters for no reason when Pillow backend is used.
Image should not have a default extension of "png". It can be a default extension for VideoFrame, which currently doesn't have a default format.
The text was updated successfully, but these errors were encountered:
save_image()
uses the "png" extension by default for non-stringfp
param. It should be an error instead, because otherwise it can lead to unexpected image conversions.Potential fix:
save_image()
doesn't support crypters for no reason when Pillow backend is used.Image
should not have a default extension of "png". It can be a default extension forVideoFrame
, which currently doesn't have a default format.The text was updated successfully, but these errors were encountered: