optimize: skip incremental images if any

These are fairly rare
This commit is contained in:
James R. Barlow
2018-06-24 00:18:48 -07:00
parent b9dc109892
commit 434b96d734
+2
View File
@@ -141,6 +141,8 @@ def extract_images(pike, root, log, options):
except AttributeError:
continue
for imname, image in dict(xobjs).items():
if image.objgen[1] != 0:
continue # Ignore images in an incremental PDF
xref = image.objgen[0]
if xref in changed_xrefs:
continue # Don't improve same image twice