Skip to content
Snippets Groups Projects
Unverified Commit c303eca8 authored by an0nfunc's avatar an0nfunc Committed by GitHub
Browse files

use Image.LANCZOS instead of Image.ANTIALIAS for thumbnail resize (#15876)


Image.ANTIALIAS is not defined in current pillow releases. Since ANTIALIAS was just using LANCZOS anyways, this is just a cosmetic change, but makes synapse work with most recent pillow releases.

Signed-off-by: default avatarGiovanni Harting <539@idlegandalf.com>
parent c8e81898
No related branches found
No related tags found
No related merge requests found
Correctly resize thumbnails with pillow version >=10.
......@@ -131,7 +131,7 @@ class Thumbnailer:
else:
with self.image:
self.image = self.image.convert("RGB")
return self.image.resize((width, height), Image.ANTIALIAS)
return self.image.resize((width, height), Image.LANCZOS)
def scale(self, width: int, height: int, output_type: str) -> BytesIO:
"""Rescales the image to the given dimensions.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment