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)