forked from rDrama/rDrama
master
parent
832e614edd
commit
2fa37bc787
|
@ -15,8 +15,8 @@ def upload_ibb(file=None, resize=False):
|
|||
|
||||
if file: file.save("image.webp")
|
||||
|
||||
i = IImage.open("image.webp")
|
||||
if resize:
|
||||
i = IImage.open("image.webp")
|
||||
size = 100, 100
|
||||
frames = ImageSequence.Iterator(i)
|
||||
|
||||
|
@ -34,7 +34,32 @@ def upload_ibb(file=None, resize=False):
|
|||
except Exception as e:
|
||||
print(e)
|
||||
return
|
||||
i.save("image.webp", format='WEBP', save_all=True)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
else:
|
||||
sequence = []
|
||||
im = Image.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:])
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
try:
|
||||
with open("image.webp", 'rb') as f:
|
||||
|
|
Loading…
Reference in New Issue