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>
This commit is contained in:
0xMRTT 2023-02-23 23:21:15 +01:00 committed by GitHub
parent 22b1b8346a
commit 222cd65d85
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View file

@ -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/"

View file

@ -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