Mageia commited on
Commit
f8034bf
1 Parent(s): 716cdbc

fix: pdf2Image zoom -> 10

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -28,7 +28,7 @@ def pdf_to_images(pdf_path):
28
  for page_num in range(len(pdf_document)):
29
  page = pdf_document.load_page(page_num)
30
  # 进一步增加分辨率和缩放比例
31
- zoom = 4 # 增加缩放比例到4
32
  mat = fitz.Matrix(zoom, zoom)
33
  pix = page.get_pixmap(matrix=mat, alpha=False)
34
  img = Image.frombytes("RGB", [pix.width, pix.height], pix.samples)
 
28
  for page_num in range(len(pdf_document)):
29
  page = pdf_document.load_page(page_num)
30
  # 进一步增加分辨率和缩放比例
31
+ zoom = 10 # 增加缩放比例到4
32
  mat = fitz.Matrix(zoom, zoom)
33
  pix = page.get_pixmap(matrix=mat, alpha=False)
34
  img = Image.frombytes("RGB", [pix.width, pix.height], pix.samples)