[preview] Preserve aspect ratio while scaling

This commit is contained in:
Philipp Hörist
2017-11-26 13:38:18 +01:00
parent 887d278d0a
commit 1d17a08659
2 changed files with 22 additions and 5 deletions

View File

@@ -74,6 +74,7 @@ def extract_and_resize_frames(mem, resize_to):
new_frame.paste(image, (0, 0), image.convert('RGBA'))
# This method preservs aspect ratio
new_frame.thumbnail(resize_to, Image.ANTIALIAS)
frames.append(new_frame)