optimize: log images with unclear decode tables

This commit is contained in:
James R. Barlow
2024-02-01 15:42:40 -08:00
parent 2005f622bb
commit 07b6f06f11
+7
View File
@@ -155,6 +155,13 @@ def extract_image_jbig2(
with imgname.open('wb') as f:
ext = pim.extract_to(stream=f)
imgname.rename(imgname.with_suffix(ext))
except NotImplementedError as e:
if '/Decode' in str(e):
log.debug(
f"xref {xref}: skipping image with unsupported Decode table"
)
return None
raise
except UnsupportedImageTypeError:
return None
finally: