mirror of
https://github.com/ocrmypdf/OCRmyPDF.git
synced 2026-05-05 13:16:55 -04:00
optimize: don't try to optimize an image we can't save
This commit is contained in:
@@ -203,7 +203,8 @@ def extract_image_generic(
|
||||
try:
|
||||
pim.as_pil_image().save(png_name(root, xref))
|
||||
except NotImplementedError:
|
||||
log.warning(f"PDF contains some images specifying non-CMYK inks. Ignoring it.")
|
||||
log.warning("PDF contains an atypical image that cannot be optimized.")
|
||||
return None
|
||||
return XrefExt(xref, '.png')
|
||||
elif (
|
||||
not pim.indexed
|
||||
|
||||
Reference in New Issue
Block a user