Skip to content
This repository has been archived by the owner on Feb 16, 2023. It is now read-only.

Commit

Permalink
better thumbnail generation for smaller files
Browse files Browse the repository at this point in the history
Jonas Winkler committed Oct 26, 2020
1 parent c596fe6 commit 743ce1d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/paperless_tesseract/parsers.py
Original file line number Diff line number Diff line change
@@ -51,7 +51,8 @@ def get_thumbnail(self):
try:
run_convert(
self.CONVERT,
"-scale", "500x5000",
"-density", "300",
"-scale", "500x5000>",
"-alpha", "remove",
"-strip", "-trim",
"{}[0]".format(self.document_path),
@@ -76,7 +77,8 @@ def get_thumbnail(self):
# then run convert on the output from gs
run_convert(
self.CONVERT,
"-scale", "500x5000",
"-density", "300",
"-scale", "500x5000>",
"-alpha", "remove",
"-strip", "-trim",
gs_out_path,

0 comments on commit 743ce1d

Please sign in to comment.