Skip to content

Conversation

@nerdcorenet
Copy link
Contributor

Pillow has deprecated use of "Image.NEAREST" for resampling method

https://github.com/python-pillow/Pillow/blob/main/docs/deprecations.rst#constants

This fixes the resampling call in rgb_display_pillow_animated_gif.py

@ladyada ladyada requested a review from makermelissa April 19, 2022 22:17
Copy link
Collaborator

@makermelissa makermelissa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like a syntax error.

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)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like you have 2 periods in a row on this line

@nerdcorenet
Copy link
Contributor Author

You are right, I was rushing. Sorry. This should be corrected now.

Copy link
Collaborator

@makermelissa makermelissa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks

@makermelissa makermelissa merged commit bc4213e into adafruit:main Apr 21, 2022
@nerdcorenet nerdcorenet deleted the example_animgif_resampling branch April 21, 2022 18:47
adafruit-adabot added a commit to adafruit/Adafruit_CircuitPython_Bundle that referenced this pull request Apr 23, 2022
Updating https://github.com/adafruit/Adafruit_CircuitPython_RGB_Display to 3.10.13 from 3.10.12:
  > Patch: Replaced discord badge image
  > Update .gitignore
  > Merge pull request adafruit/Adafruit_CircuitPython_RGB_Display#106 from nerdcorenet/example_animgif_resampling
  > Merge pull request adafruit/Adafruit_CircuitPython_RGB_Display#104 from nerdcorenet/example_animgif_path
  > Update Black to latest.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants