remotes/1693045480750635534/spooky-22
Aevann1 2021-07-30 12:45:53 +02:00
parent fcf63740be
commit e46b8039e3
2 changed files with 3 additions and 1 deletions

1
.gitignore vendored
View File

@ -1,3 +1,4 @@
image.gif
dramacache/
__pycache__/
*.py[cod]

View File

@ -16,12 +16,13 @@ def upload_file(file=None, resize=False):
if resize:
i = IImage.open("image.gif")
size = 100, 100
frames = ImageSequence.Iterator(i)
def thumbnails(frames):
for frame in frames:
thumbnail = frame.copy()
thumbnail.thumbnail(100, 100, IImage.ANTIALIAS)
thumbnail.thumbnail(size, IImage.ANTIALIAS)
yield thumbnail
frames = thumbnails(frames)