Skip to content

Commit 30ff399

Browse files
committed
Backport pillow antialias constant for version 10.0.0
1 parent a0b6510 commit 30ff399

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,12 @@ https://semver.org/spec/v2.0.0.html
1515
### Changed
1616
- Upgrade `numpy` upper pin to 1.26.
1717
- Upgrade `pyproj` upper pin to 3.7.
18+
- Upgrade optional `pillow` upper pin to 10.1.0.
1819
- Upgrade documentation and linting dependencies.
1920

2021
### Fixed
22+
- Fix deprecated `Image.ANTIALIAS` with `Image.LANCZOS` when `pillow`
23+
version is at least 10.0.0 (PR [#580], thanks to @cgohlke).
2124
- Downgrade upper pin for Cython requirement from 3.1 to 3.0 due to
2225
build error triggered by `_geoslib.pyx` (solves issue [#581]).
2326
- Downgrade lower pin for `numpy` to `>= 1.21` for Python >= 3.8, whose
@@ -972,6 +975,8 @@ https://semver.org/spec/v2.0.0.html
972975

973976
[#581]:
974977
https://github.com/matplotlib/basemap/issues/581
978+
[#580]:
979+
https://github.com/matplotlib/basemap/pull/580
975980
[#573]:
976981
https://github.com/matplotlib/basemap/issues/573
977982
[#564]:

packages/basemap/requirements-test.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,4 @@ pillow >= 4.3.0, < 5.0.0; python_version == "3.3"
2828
pillow >= 5.4.0, < 6.0.0; python_version == "3.4"
2929
pillow >= 7.1.0, < 8.0.0; python_version == "3.5"
3030
pillow >= 8.3.2, < 9.0.0; python_version == "3.6"
31-
pillow >= 9.4.0, < 10.0.0; python_version >= "3.7"
31+
pillow >= 9.4.0, < 10.1.0; python_version >= "3.7"

packages/basemap/src/mpl_toolkits/basemap/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4107,7 +4107,7 @@ def warpimage(self,image="bluemarble",scale=None,**kwargs):
41074107
w, h = pilImage.size
41084108
width = int(np.round(w*scale))
41094109
height = int(np.round(h*scale))
4110-
pilImage = pilImage.resize((width,height),Image.ANTIALIAS)
4110+
pilImage = pilImage.resize((width,height),Image.LANCZOS)
41114111
if _matplotlib_version >= '1.2':
41124112
# orientation of arrays returned by pil_to_array
41134113
# changed (https://github.com/matplotlib/matplotlib/pull/616)

0 commit comments

Comments
 (0)