diff --git a/examples/rgb_display_pillow_animated_gif.py b/examples/rgb_display_pillow_animated_gif.py index 92254ee..6b872f0 100644 --- a/examples/rgb_display_pillow_animated_gif.py +++ b/examples/rgb_display_pillow_animated_gif.py @@ -13,6 +13,7 @@ not support PIL/pillow (python imaging library)! Author(s): Melissa LeBlanc-Williams for Adafruit Industries + Mike Mallett """ import os import time @@ -122,7 +123,7 @@ def preload(self): frame_object.image = ImageOps.pad( # pylint: disable=no-member image.convert("RGB"), (self._width, self._height), - method=Image.NEAREST, + method=Image.Resampling.NEAREST, color=(0, 0, 0), centering=(0.5, 0.5), ) diff --git a/examples/rgb_display_pillow_image.py b/examples/rgb_display_pillow_image.py index d05dd92..04c40cc 100644 --- a/examples/rgb_display_pillow_image.py +++ b/examples/rgb_display_pillow_image.py @@ -84,7 +84,7 @@ else: scaled_width = width scaled_height = image.height * width // image.width -image = image.resize((scaled_width, scaled_height), Image.BICUBIC) +image = image.resize((scaled_width, scaled_height), Image.Resampling.BICUBIC) # Crop and center the image x = scaled_width // 2 - width // 2