This commit is contained in:
Aevann1 2022-02-18 21:12:14 +02:00
parent aa3e20a5ca
commit dcf373ef1e
7 changed files with 66 additions and 7 deletions

View file

@ -8,7 +8,8 @@ def process_image(filename=None, resize=0):
i = Image.open(filename)
if resize and i.width > resize:
subprocess.call(["convert", filename, "-coalesce", "-resize", f"{resize}>", filename])
try: subprocess.call(["convert", filename, "-coalesce", "-resize", f"{resize}>", filename])
except: pass
elif i.format.lower() != "webp":
exif = i.getexif()