remotes/1693045480750635534/spooky-22
parent
8d48a2bf3e
commit
6bb6130a28
|
@ -15,7 +15,6 @@ def upload_ibb(file=None, resize=False):
|
|||
|
||||
if file: file.save("image.webp")
|
||||
|
||||
if resize:
|
||||
i = IImage.open("image.webp")
|
||||
size = 100, 100
|
||||
frames = ImageSequence.Iterator(i)
|
||||
|
@ -23,7 +22,7 @@ def upload_ibb(file=None, resize=False):
|
|||
def thumbnails(frames):
|
||||
for frame in frames:
|
||||
thumbnail = frame.copy()
|
||||
thumbnail.thumbnail(size, IImage.ANTIALIAS)
|
||||
if resize: thumbnail.thumbnail(size, IImage.ANTIALIAS)
|
||||
yield thumbnail
|
||||
|
||||
frames = thumbnails(frames)
|
||||
|
|
Loading…
Reference in New Issue