From 0256638d752015363b1a1401f6065106356206ec Mon Sep 17 00:00:00 2001 From: Patrick Kranzlmueller Date: Thu, 27 Jul 2023 14:05:28 +0200 Subject: [PATCH] fixed antialias with pillow 10, #416 --- filebrowser/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/filebrowser/utils.py b/filebrowser/utils.py index 4ebb5a5b7..7c491d5b5 100644 --- a/filebrowser/utils.py +++ b/filebrowser/utils.py @@ -103,7 +103,7 @@ def scale_and_crop(im, width=None, height=None, opts='', **kwargs): r = min(xr / x, yr / y) if r < 1.0 or (r > 1.0 and 'upscale' in opts): - im = im.resize((int(math.ceil(x * r)), int(math.ceil(y * r))), resample=Image.ANTIALIAS) + im = im.resize((int(math.ceil(x * r)), int(math.ceil(y * r))), resample=Image.Resampling.LANCZOS) if 'crop' in opts: x, y = [float(v) for v in im.size]