From e46b8039e362c7cc472ca1424a2914d5af106ec8 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Fri, 30 Jul 2021 12:45:53 +0200 Subject: [PATCH] fdfd --- .gitignore | 1 + drama/helpers/images.py | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index af0747b34..82c550881 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ +image.gif dramacache/ __pycache__/ *.py[cod] diff --git a/drama/helpers/images.py b/drama/helpers/images.py index aa7909972..24f8f1c3a 100644 --- a/drama/helpers/images.py +++ b/drama/helpers/images.py @@ -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)