mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-12-18 12:37:08 +01:00
Minor tweaks to getting the document thumbnail path. Adds text thumbnail as webp
This commit is contained in:
parent
58f2c6a5fc
commit
6844f8f2bf
2 changed files with 17 additions and 15 deletions
|
|
@ -30,8 +30,8 @@ class TextDocumentParser(DocumentParser):
|
|||
)
|
||||
draw.text((5, 5), read_text(), font=font, fill="black")
|
||||
|
||||
out_path = os.path.join(self.tempdir, "thumb.png")
|
||||
img.save(out_path)
|
||||
out_path = os.path.join(self.tempdir, "thumb.webp")
|
||||
img.save(out_path, format="WEBP")
|
||||
|
||||
return out_path
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue