Skip to content

Commit 94b0a9a

Browse files
authored
Merge pull request #114 from makermelissa/master
Update examples to work with Pillow 10.0.0
2 parents 3a313a3 + 0603368 commit 94b0a9a

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

examples/rgb_display_pillow_animated_gif.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ def preload(self):
124124
frame_object.image = ImageOps.pad( # pylint: disable=no-member
125125
image.convert("RGB"),
126126
(self._width, self._height),
127-
method=Image.Resampling.NEAREST,
127+
method=Image.NEAREST,
128128
color=(0, 0, 0),
129129
centering=(0.5, 0.5),
130130
)

examples/rgb_display_pillow_image.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@
8686
else:
8787
scaled_width = width
8888
scaled_height = image.height * width // image.width
89-
image = image.resize((scaled_width, scaled_height), Image.Resampling.BICUBIC)
89+
image = image.resize((scaled_width, scaled_height), Image.BICUBIC)
9090

9191
# Crop and center the image
9292
x = scaled_width // 2 - width // 2

0 commit comments

Comments
 (0)