From 9c619ba0575113382ee01a9e682442e1019f9c1a Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Sat, 11 Sep 2021 05:10:41 +0200 Subject: [PATCH] fd --- files/helpers/images.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/files/helpers/images.py b/files/helpers/images.py index e367e04cdc..712113d6d5 100644 --- a/files/helpers/images.py +++ b/files/helpers/images.py @@ -73,9 +73,11 @@ def upload_imgur(filepath=None, file=None, resize=False): def thumbnails(frames): for frame in frames: - thumbnail = frame.copy() - thumbnail.thumbnail(size) - yield thumbnail + new_image = Image.new("RGBA", frame.size, "WHITE") + new_image.paste(i, (0, 0), i) + new_image.convert('RGB') + new_image.thumbnail(size) + yield new_image frames = thumbnails(frames)