From 60cf0bddfd35dd3fcd87b2e077b05bb170983977 Mon Sep 17 00:00:00 2001 From: Robert Sachunsky Date: Tue, 28 May 2024 14:07:45 +0200 Subject: [PATCH] check_dpi: fix Pillow type detection --- qurator/eynollah/utils/pil_cv2.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qurator/eynollah/utils/pil_cv2.py b/qurator/eynollah/utils/pil_cv2.py index 20dc22f..83ae47d 100644 --- a/qurator/eynollah/utils/pil_cv2.py +++ b/qurator/eynollah/utils/pil_cv2.py @@ -16,7 +16,7 @@ def pil2cv(img): def check_dpi(img): try: - if isinstance(img, Image.__class__): + if isinstance(img, Image.Image): pil_image = img elif isinstance(img, str): pil_image = Image.open(img)