Compare commits

...

4 Commits

Author SHA1 Message Date
GuillaumeRattin 188d60af5f
Merge aafeb8cf89 into d5a3fb0c47 2025-05-12 22:28:47 +05:30
Kenneth Estanislao d5a3fb0c47
Merge pull request #1268 from jiacheng-0/main
Update __init__.py
2025-05-13 00:57:09 +08:00
Teo Jia Cheng 9690070399 Update __init__.py 2025-05-13 00:14:49 +08:00
GuillaumeRattin aafeb8cf89
Add pygrabber==0.2 to requirements.txt 2025-05-07 14:43:53 +02:00
2 changed files with 3 additions and 2 deletions

View File

@ -11,8 +11,8 @@ def imwrite_unicode(path, img, params=None):
root, ext = os.path.splitext(path)
if not ext:
ext = ".png"
result, encoded_img = cv2.imencode(ext, img, params if params else [])
result, encoded_img = cv2.imencode(f".{ext}", img, params if params is not None else [])
result, encoded_img = cv2.imencode(ext, img, params if params else [])
result, encoded_img = cv2.imencode(f".{ext}", img, params if params is not None else [])
encoded_img.tofile(path)
return True
return False

View File

@ -19,3 +19,4 @@ onnxruntime-gpu==1.17; sys_platform != 'darwin'
tensorflow; sys_platform != 'darwin'
opennsfw2==0.10.2
protobuf==4.23.2
pygrabber==0.2