From a64940def77f1201fd23efea6bc4d9dadae33a2b Mon Sep 17 00:00:00 2001 From: KUNJ SHAH Date: Mon, 5 May 2025 13:19:46 +0000 Subject: [PATCH] update --- modules/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/__init__.py b/modules/__init__.py index 7968738..45a9cac 100644 --- a/modules/__init__.py +++ b/modules/__init__.py @@ -12,7 +12,7 @@ def imwrite_unicode(path, img, params=None): if not ext: ext = ".png" result, encoded_img = cv2.imencode(ext, img, params if params else []) - if result: + result, encoded_img = cv2.imencode(f".{ext}", img, params if params is not None else []) encoded_img.tofile(path) return True return False \ No newline at end of file