bb
This commit is contained in:
parent
7401ecb058
commit
2aebbbba0e
3 changed files with 3 additions and 3 deletions
Binary file not shown.
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 4.7 KiB |
Binary file not shown.
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 5.6 KiB |
|
@ -19,9 +19,9 @@ def process_image(filename=None, resize=False):
|
||||||
|
|
||||||
om = next(frames)
|
om = next(frames)
|
||||||
om.info = i.info
|
om.info = i.info
|
||||||
om.save(filename, format="WEBP", save_all=True, append_images=list(frames), loop=0, lossless=True, quality=100, method=6)
|
om.save(filename, format="WEBP", save_all=True, append_images=list(frames), loop=0, method=6, allow_mixed=True)
|
||||||
elif i.format.lower() != "webp":
|
elif i.format.lower() != "webp":
|
||||||
if i.format.lower() == "gif": gifwebp(input_image=filename, output_image=filename, option="-q 100 -m 6 -metadata 'none' -mt")
|
if i.format.lower() == "gif": gifwebp(input_image=filename, output_image=filename, option="-mixed -metadata none -f 100 -mt -m 6")
|
||||||
else: i.save(filename, format="WEBP", lossless=True, quality=100, method=6)
|
else: i.save(filename, format="WEBP", method=6)
|
||||||
|
|
||||||
return f'/static{filename}'
|
return f'/static{filename}'
|
Loading…
Add table
Add a link
Reference in a new issue