From 6a4b91035a0a72ee9b4a54345415ce99bb263311 Mon Sep 17 00:00:00 2001 From: Jochem Berends Date: Mon, 4 Jul 2022 15:11:19 +0200 Subject: [PATCH] #58 updated image deprecations for Pillow 10 - according to https://pillow.readthedocs.io/en/stable/deprecations.html - `Image.ANTIALIAS` -> `Image.Resampling.LANCZOS` --- pilkit/processors/resize.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pilkit/processors/resize.py b/pilkit/processors/resize.py index 413e386..245bb9a 100644 --- a/pilkit/processors/resize.py +++ b/pilkit/processors/resize.py @@ -22,7 +22,7 @@ def __init__(self, width, height, upscale=True): def process(self, img): if self.upscale or (self.width < img.size[0] and self.height < img.size[1]): img = resolve_palette(img) - img = img.resize((self.width, self.height), Image.LANCZOS) + img = img.resize((self.width, self.height), Image.Resampling.LANCZOS) return img