mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-08-10 00:18:57 +00:00
Cleaned up the thumbnails by switching to .png
This commit is contained in:
@@ -65,17 +65,18 @@ def move_documents_and_create_thumbnails(apps, schema_editor):
|
||||
|
||||
subprocess.Popen((
|
||||
settings.CONVERT_BINARY,
|
||||
"-scale", "500x500",
|
||||
"-scale", "500x5000",
|
||||
"-alpha", "remove",
|
||||
orig_target,
|
||||
os.path.join(thumb_temp, "convert-%04d.jpg")
|
||||
os.path.join(thumb_temp, "convert-%04d.png")
|
||||
)).wait()
|
||||
|
||||
thumb_source = os.path.join(thumb_temp, "convert-0000.jpg")
|
||||
thumb_source = os.path.join(thumb_temp, "convert-0000.png")
|
||||
thumb_target = os.path.join(
|
||||
settings.MEDIA_ROOT,
|
||||
"documents",
|
||||
"thumbnails",
|
||||
re.sub(r"(\d+)\.\w+(\.gpg)", "\\1.jpg\\2", f)
|
||||
re.sub(r"(\d+)\.\w+(\.gpg)", "\\1.png\\2", f)
|
||||
)
|
||||
with open(thumb_source, "rb") as unencrypted:
|
||||
with open(thumb_target, "wb") as encrypted:
|
||||
|
Reference in New Issue
Block a user