7ef37540 by 周伟奇

Update pdf_to_img.py

1 parent 58addb24
......@@ -81,7 +81,12 @@ class PDFHandler:
tpix = fitz.Pixmap(fitz.csRGB, pix)
return tpix
else:
return doc.extractImage(xref)
res = doc.extractImage(xref)
if res is None:
return fitz.Pixmap(doc, xref)
else:
return res
# return doc.extractImage(xref)
@staticmethod
def get_img_data(pix):
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!