Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Commit

Permalink
use Image.LANCZOS instead of Image.ANTIALIAS for thumbnail resize
Browse files Browse the repository at this point in the history
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: Giovanni Harting <[email protected]>
  • Loading branch information
an0nfunc committed Jul 4, 2023
1 parent 670d590 commit a4839fd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion synapse/media/thumbnailer.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ def _resize(self, width: int, height: int) -> Image.Image:
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.
Expand Down

0 comments on commit a4839fd

Please sign in to comment.