Skip to content

Fix Pillow resampling change in rgb_display_pillow_animated_gif.py #106

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Apr 21, 2022

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.

@@ -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)
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