From 969007039993c3f161bbc7226ceb6de73f93b6d9 Mon Sep 17 00:00:00 2001 From: Teo Jia Cheng Date: Tue, 13 May 2025 00:14:49 +0800 Subject: [PATCH] Update __init__.py --- modules/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/__init__.py b/modules/__init__.py index 45a9cac..6eca4a3 100644 --- a/modules/__init__.py +++ b/modules/__init__.py @@ -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 \ No newline at end of file