TexTeller v2

This commit is contained in:
三洋三洋
2024-03-25 06:54:22 +00:00
parent 74341c7e8a
commit ef218d67f6
7 changed files with 28 additions and 22 deletions

View File

@@ -95,7 +95,7 @@ def rendering(formula: str, out_img_path: Path) -> bool:
return p.returncode == 0
def pdf_to_pngbytes(pdf_path):
images = convert_from_path(pdf_path, first_page=1, last_page=1)
images = convert_from_path(pdf_path, dpi=400,first_page=1, last_page=1)
trimmed_images = trim(images[0])
png_image_bytes = io.BytesIO()
trimmed_images.save(png_image_bytes, format='PNG')