From 918f48a5f00bd7f5abe3dab72c9bc835f7bc33fa Mon Sep 17 00:00:00 2001 From: narugo1992 <117186571+narugo1992@users.noreply.github.com> Date: Fri, 13 Sep 2024 14:31:08 +0800 Subject: [PATCH] dev(narugo): try fix --- skpick/check/hqimage.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/skpick/check/hqimage.py b/skpick/check/hqimage.py index 8181733..bddd355 100644 --- a/skpick/check/hqimage.py +++ b/skpick/check/hqimage.py @@ -11,7 +11,6 @@ def is_hqimage(file, face_threshold: int = 5000): try: image = Image.open(file) - image.load() except UnidentifiedImageError: return False except OSError: @@ -32,7 +31,7 @@ def is_hqimage(file, face_threshold: int = 5000): area = abs((x1 - x0) * (y1 - y0)) if area >= face_threshold: return True - except OSError: + except (OSError, SyntaxError): return False return False