master
Aevann1 2021-09-15 11:15:56 +02:00
parent ed0bfc5693
commit 0d1f4dfbc9
1 changed files with 2 additions and 8 deletions

View File

@ -5,6 +5,7 @@ import base64
from files.classes.images import *
from flask import g
from werkzeug.utils import secure_filename
from webptools import gifwebp
CF_KEY = environ.get("CLOUDFLARE_KEY", "").strip()
CF_ZONE = environ.get("CLOUDFLARE_ZONE", "").strip()
@ -41,14 +42,7 @@ def upload_ibb(file=None, resize=False):
else:
sequence = []
im = IImage.open("image.webp")
for frame in ImageSequence.Iterator(im):
sequence.append(frame.copy())
sequence[0].save("image.webp", save_all=True, append_images = sequence[1:])
print(gifwebp(input_image="image.webp", output_image="image.webp", option="-q 80", logging="-v"))