Merge pull request #109 from bertsky/patch-3

pil_cv2.check_dpi: fix class membership test
This commit is contained in:
vahidrezanezhad 2023-06-21 16:37:16 +02:00 committed by GitHub
commit 5f7d9a475c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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)