Skip to content

Commit

Permalink
feat: Version 2.2.6 - Support for Pillow 10 (#1374)
Browse files Browse the repository at this point in the history
* Bump to version 2.2.5

* Update pre-commit: isort version

* Add Pillow 10 support

* Add Pillow 10 support, bump to 2.2.6
  • Loading branch information
fsbraun authored Jul 3, 2023
1 parent c5c3bf2 commit 256fa14
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 3 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@
CHANGELOG
=========

2.2.6 (2023-07-03)
==================

* Add support for Pillow 10


2.2.5 (2023-06-11)
==================

Expand Down
2 changes: 1 addition & 1 deletion filer/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@
8. Publish the release and it will automatically release to pypi
"""

__version__ = '2.2.5'
__version__ = '2.2.6'

default_app_config = 'filer.apps.FilerConfig'
9 changes: 7 additions & 2 deletions filer/thumbnail_processors.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,13 @@ def scale_and_crop_with_subject_location(im, size, subject_location=False,
scale *= (100 + int(zoom)) / 100.0

if scale < 1.0 or (scale > 1.0 and upscale):
im = im.resize((int(source_x * scale), int(source_y * scale)),
resample=Image.ANTIALIAS)
try:
im = im.resize((int(source_x * scale), int(source_y * scale)),
resample=Image.LANCZOS)
except AttributeError: # pragma: no cover
im = im.resize((int(source_x * scale), int(source_y * scale)),
resample=Image.ANTIALIAS)

# --endsnip-- begin real code

# ===============================
Expand Down

0 comments on commit 256fa14

Please sign in to comment.