From e7867eb9e9d646b06b65fef4a16df0f5a2b78cdf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Magalh=C3=A3es?= Date: Thu, 4 Jan 2024 10:53:47 +0000 Subject: [PATCH] chore: better defaulting of image resampling --- misc/src/image_treatment_c/system.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/src/image_treatment_c/system.py b/misc/src/image_treatment_c/system.py index ae28e04a0..8c310fa0b 100644 --- a/misc/src/image_treatment_c/system.py +++ b/misc/src/image_treatment_c/system.py @@ -89,7 +89,7 @@ def resize_image(self, image_path, width, height, image_type = JPEG_VALUE): # setting the offset position to the initial one image = PIL.Image.open(image_path) algorithm = PIL.Image.ANTIALIAS if hasattr(PIL.Image, "ANTIALIAS") else\ - PIL.Image.LANCZOS + (PIL.Image.LANCZOS if hasattr(PIL.Image, "LANCZOS") else None) image_resize = image.resize((width, height), algorithm) string_buffer = colony.StringBuffer(False) image_resize.save(string_buffer, image_type)