From 94aae9bb0894e4a8c57a072ef5032960abaed260 Mon Sep 17 00:00:00 2001 From: Fahrzin Hemmati Date: Sun, 2 Jul 2023 00:58:49 -0700 Subject: [PATCH] Switch Image.ANTIALIAS to Image.LANCZOS This was changed in Pillow 2.7.0 and finally removed in Pillow 10 --- advthumbnailer.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/advthumbnailer.py b/advthumbnailer.py index 179375f..82ddac4 100644 --- a/advthumbnailer.py +++ b/advthumbnailer.py @@ -73,12 +73,12 @@ def _exact_resize(self, w, h, image, forced=False): if image_w < w and image_h < h and not forced: return image - retval = ImageOps.fit(image, (w, h), Image.ANTIALIAS) + retval = ImageOps.fit(image, (w, h), Image.LANCZOS) return retval def _aspect_resize(self, w, h, image, forced=False): retval = image.copy() - retval.thumbnail((w, h), Image.ANTIALIAS) + retval.thumbnail((w, h), Image.LANCZOS) return retval