forked from rDrama/rDrama
restore -coalesce
parent
75ee126b61
commit
3eb364b143
|
@ -131,7 +131,7 @@ def process_image(filename=None, resize=0, trim=False, uploader=None, patron=Fal
|
||||||
abort(413, f"Max image/audio size is {MAX_IMAGE_AUDIO_SIZE_MB} MB ({MAX_IMAGE_AUDIO_SIZE_MB_PATRON} MB for paypigs)")
|
abort(413, f"Max image/audio size is {MAX_IMAGE_AUDIO_SIZE_MB} MB ({MAX_IMAGE_AUDIO_SIZE_MB_PATRON} MB for paypigs)")
|
||||||
|
|
||||||
with Image.open(filename) as i:
|
with Image.open(filename) as i:
|
||||||
params = ["convert", filename, "-quality", "88", "-define", "webp:method=6"]
|
params = ["convert", "-coalesce", filename, "-quality", "88", "-define", "webp:method=6"]
|
||||||
if trim and len(list(Iterator(i))) == 1:
|
if trim and len(list(Iterator(i))) == 1:
|
||||||
params.append("-trim")
|
params.append("-trim")
|
||||||
if resize and i.width > resize:
|
if resize and i.width > resize:
|
||||||
|
|
Loading…
Reference in New Issue