Remove unneded exception handler from has_alpha()

This commit is contained in:
Martin Müller 2022-02-21 22:58:19 +01:00
parent a662ce03ea
commit 5fa3ec6704

View File

@ -67,14 +67,8 @@ class RasterisedDocumentParser(DocumentParser):
]
def has_alpha(self, image):
try:
with Image.open(image) as im:
return im.mode in ('RGBA', 'LA')
except Exception as e:
self.log(
'warning',
f"Error while check for alpha channel in image {image}: {e}")
return None
def get_dpi(self, image):
try: