07c844aa by 周伟奇

fix pdf_to_img

1 parent 44df52f5
......@@ -205,7 +205,11 @@ 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
@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!