From f7e0c3135a3661893b79ab2be9e3f9f9df04c668 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcelo=20Elizeche=20Land=C3=B3?= Date: Wed, 29 Nov 2023 04:53:17 -0300 Subject: [PATCH] use Image.LANCZOS instead of Image.ANTIALIAS(deprecated) for creating the thumbnails --- core/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/utils.py b/core/utils.py index 48eb802..22179db 100644 --- a/core/utils.py +++ b/core/utils.py @@ -26,7 +26,7 @@ def create_thumbnail(imagepath: str, basewidth: int, force=False) -> bool: img = Image.open(imagepath) wpercent = basewidth / float(img.size[0]) hsize = int((float(img.size[1]) * float(wpercent))) - img = img.resize((basewidth, hsize), Image.ANTIALIAS) + img = img.resize((basewidth, hsize), Image.LANCZOS) thumbfilename = "{}_th{}".format( path.splitext(imagepath)[0], path.splitext(imagepath)[1],