From b94834ac9895f2eba8f927674ec53aa8870a5162 Mon Sep 17 00:00:00 2001 From: caiwx86 Date: Tue, 6 Dec 2022 20:49:41 +0800 Subject: [PATCH] commit --- utils/ImageUtils.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/utils/ImageUtils.py b/utils/ImageUtils.py index c861871..7ef627e 100644 --- a/utils/ImageUtils.py +++ b/utils/ImageUtils.py @@ -41,7 +41,10 @@ class imageUtils: print("图片已解密,已跳过:", save_file_path) return None image_su = str(file_path).split(".")[-1] - img = Image.open(file_path) + try: + img = Image.open(file_path) + except: + print(f"error Image") width = img.width height = img.height #blocks = cls.encodeImage(enStr)