From edcc966ab90e603fe3942628539c5535cb8db17f Mon Sep 17 00:00:00 2001 From: Kuba Orlik Date: Thu, 25 Aug 2022 17:28:29 +0200 Subject: [PATCH] Convert screenshots to jpg so more of them can fit in an email body --- Docker/annotate_header.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Docker/annotate_header.py b/Docker/annotate_header.py index 37c7b6e..f9ad263 100644 --- a/Docker/annotate_header.py +++ b/Docker/annotate_header.py @@ -113,9 +113,9 @@ with Image.open(output_file) as im: im = im.crop((0, 24, 2880, 1588)) im = im.resize((im.width // 2, im.height // 2)) thumbnail = im.resize((im.width // 5, im.height // 5)) - output_filename = domain.replace(".", "_") + "_" + output_suffix + output_filename = domain.replace(".", "_") + "_" + output_suffix.replace("png", "jpg") thumbnail_filename = domain.replace(".", "_") + "_thumb_" + output_suffix.replace("png", "jpg") - im.save(output_dir + "/" + output_filename, "PNG") + im.save(output_dir + "/" + output_filename, "JPEG") thumbnail.save(output_dir + "/" + thumbnail_filename, "JPEG") print(json.dumps({"new_file": {