From 222cd65d85ec5dfdf0652ec0b525e3471e3fd6a5 Mon Sep 17 00:00:00 2001 From: 0xMRTT <0xMRTT@proton.me> Date: Thu, 23 Feb 2023 23:21:15 +0100 Subject: [PATCH] Update RESIZE_METHOD (#222) (#226) * fix(conf): image resize method (#222) * doc: update because of #222 * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * fix(requirements): add packaging>=23.0 for pillow version * fix(requirements): add packaging for pillow version check * fix: resize method -> Image.LANCZOS * fix(doc): update resize method: Image.LANCZOS * fix(deps): remove packaging * fix(deps): remove packaging --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- avatar/conf.py | 2 +- docs/index.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/avatar/conf.py b/avatar/conf.py index e3a49fe..caf3da9 100644 --- a/avatar/conf.py +++ b/avatar/conf.py @@ -5,7 +5,7 @@ from PIL import Image class AvatarConf(AppConf): DEFAULT_SIZE = 80 - RESIZE_METHOD = Image.ANTIALIAS + RESIZE_METHOD = Image.LANCZOS STORAGE_DIR = "avatars" PATH_HANDLER = "avatar.models.avatar_path_handler" GRAVATAR_BASE_URL = "https://www.gravatar.com/avatar/" diff --git a/docs/index.txt b/docs/index.txt index 41ae81a..4309714 100644 --- a/docs/index.txt +++ b/docs/index.txt @@ -211,7 +211,7 @@ appear on the site. Listed below are those settings: .. py:data:: AVATAR_RESIZE_METHOD The method to use when resizing images, based on the options available in - Pillow. Defaults to ``Image.ANTIALIAS``. + Pillow. Defaults to ``Image.LANCZOS``. .. py:data:: AVATAR_STORAGE_DIR