1
0
mirror of https://github.com/ciromattia/kcc synced 2026-04-13 20:49:20 +00:00

revert 2x render, too expensive (#1287)

This commit is contained in:
Alex Xu
2026-04-11 18:06:03 -07:00
committed by GitHub
parent 232bac00a9
commit fa33ef8f89

View File

@@ -892,10 +892,12 @@ def getWorkFolder(afile, workdir=None):
raise UserWarning("Failed to extract images from PDF file.")
return workdir
target_width, target_height = options.profileData[1]
#Account for possible margin at the top and bottom
if options.cropping:
target_width *= 2
target_height *= 2
if options.cropping == 1:
target_height *= 1.2 #Account for possible margin at the top and bottom
target_width *= 1.2
elif options.cropping == 2:
target_height *= 1.25 #Account for possible margin at the top and bottom with page number
target_width *= 1.25
try:
mupdf_pdf_process_pages_parallel(afile, fullPath, target_width, target_height)
except Exception as e: