summary refs log tree commit diff
path: root/synapse/media/thumbnailer.py
diff options
context:
space:
mode:
authoran0nfunc <40771419+an0nfunc@users.noreply.github.com>2023-07-05 10:52:12 +0200
committerGitHub <noreply@github.com>2023-07-05 10:52:12 +0200
commitc303eca8cc31e5eb9edb10019f02c3a9e39a47ab (patch)
treef55172114a022371e33def0922ccaba166e3cf24 /synapse/media/thumbnailer.py
parentAdd not_user_type param to the list accounts admin API (#15844) (diff)
downloadsynapse-c303eca8cc31e5eb9edb10019f02c3a9e39a47ab.tar.xz
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>
Diffstat (limited to 'synapse/media/thumbnailer.py')
-rw-r--r--synapse/media/thumbnailer.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/synapse/media/thumbnailer.py b/synapse/media/thumbnailer.py
index f909a4fb9a..73d2272f05 100644
--- a/synapse/media/thumbnailer.py
+++ b/synapse/media/thumbnailer.py
@@ -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.