Use lanczos for compression and always compress

This commit is contained in:
Nick80835 2023-07-23 11:06:34 -04:00
parent 9cf4cd70d1
commit 4e305c9e17

View File

@ -58,10 +58,7 @@ def _resize_photo_if_needed(
except KeyError:
kwargs = {}
if image.width <= width and image.height <= height:
return file
image.thumbnail((width, height), PIL.Image.ANTIALIAS)
image.thumbnail((width, height), PIL.Image.LANCZOS)
alpha_index = image.mode.find('A')
if alpha_index == -1: