Skip to content

Commit

Permalink
Update ANTIALIAS to LANCZOS as thumbnail strategy, since ANTIALIAS su…
Browse files Browse the repository at this point in the history
…pport is dropped in pillow 10
  • Loading branch information
stefanmajoor authored and Szaki committed Jul 4, 2023
1 parent f131009 commit fb75900
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion binder/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -1835,7 +1835,7 @@ def _clean_image_file(self, field, value):

# Resize images that are too large.
if width > max_width or height > max_height:
img.thumbnail((max_width, max_height), Image.ANTIALIAS)
img.thumbnail((max_width, max_height), Image.LANCZOS)
logger.info('image dimensions ({}x{}) exceeded ({}, {}), resizing.'.format(width, height, max_width, max_height))
if img.mode not in ["1", "L", "P", "RGB", "RGBA"]:
img = img.convert("RGB")
Expand Down

0 comments on commit fb75900

Please sign in to comment.