Minor tweaks to getting the document thumbnail path. Adds text thumbnail as webp

This commit is contained in:
Trenton Holmes
2022-06-10 06:56:28 -07:00
parent 58f2c6a5fc
commit 6844f8f2bf
2 changed files with 17 additions and 15 deletions

View File

@@ -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