mirror of
https://mau.dev/maunium/synapse.git
synced 2024-10-01 01:36:05 -04:00
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: Giovanni Harting <539@idlegandalf.com>
This commit is contained in:
parent
c8e81898b6
commit
c303eca8cc
1
changelog.d/15876.bugfix
Normal file
1
changelog.d/15876.bugfix
Normal file
@ -0,0 +1 @@
|
||||
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.
|
||||
|
Loading…
Reference in New Issue
Block a user