Convert screenshots to jpg so more of them can fit in an email body
This commit is contained in:
parent
5f6991b08f
commit
edcc966ab9
|
@ -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":
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue
Block a user