Skip to content

Commit 256fa14

Browse files
authored
feat: Version 2.2.6 - Support for Pillow 10 (#1374)
* Bump to version 2.2.5 * Update pre-commit: isort version * Add Pillow 10 support * Add Pillow 10 support, bump to 2.2.6
1 parent c5c3bf2 commit 256fa14

File tree

3 files changed

+14
-3
lines changed

3 files changed

+14
-3
lines changed

CHANGELOG.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22
CHANGELOG
33
=========
44

5+
2.2.6 (2023-07-03)
6+
==================
7+
8+
* Add support for Pillow 10
9+
10+
511
2.2.5 (2023-06-11)
612
==================
713

filer/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,6 @@
1313
8. Publish the release and it will automatically release to pypi
1414
"""
1515

16-
__version__ = '2.2.5'
16+
__version__ = '2.2.6'
1717

1818
default_app_config = 'filer.apps.FilerConfig'

filer/thumbnail_processors.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,13 @@ def scale_and_crop_with_subject_location(im, size, subject_location=False,
7575
scale *= (100 + int(zoom)) / 100.0
7676

7777
if scale < 1.0 or (scale > 1.0 and upscale):
78-
im = im.resize((int(source_x * scale), int(source_y * scale)),
79-
resample=Image.ANTIALIAS)
78+
try:
79+
im = im.resize((int(source_x * scale), int(source_y * scale)),
80+
resample=Image.LANCZOS)
81+
except AttributeError: # pragma: no cover
82+
im = im.resize((int(source_x * scale), int(source_y * scale)),
83+
resample=Image.ANTIALIAS)
84+
8085
# --endsnip-- begin real code
8186

8287
# ===============================

0 commit comments

Comments
 (0)