Don't try to run jbig2 when not available

This commit is contained in:
James R. Barlow
2018-05-11 12:42:00 -07:00
parent 3254315127
commit d9bbb80a6b
2 changed files with 11 additions and 2 deletions
+1 -1
View File
@@ -133,7 +133,7 @@ def extract_image(*, doc, pike, root, log, image, xref, jbig2s,
return False
filtdp = filtdps[0]
if bpc == 1 and filtdp[0] != '/JBIG2Decode':
if bpc == 1 and filtdp[0] != '/JBIG2Decode' and jbig2enc.available():
if filtdp[0] == '/CCITTFaxDecode':
data = image.read_raw_bytes()
try: