check_dpi: fix Pillow type detection

pull/108/head
Robert Sachunsky 7 months ago
parent c52ef98821
commit 60cf0bddfd

@ -16,7 +16,7 @@ def pil2cv(img):
def check_dpi(img): def check_dpi(img):
try: try:
if isinstance(img, Image.__class__): if isinstance(img, Image.Image):
pil_image = img pil_image = img
elif isinstance(img, str): elif isinstance(img, str):
pil_image = Image.open(img) pil_image = Image.open(img)

Loading…
Cancel
Save