Skip to content
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

Image.NONE is only used for resampling and dithers #5908

Merged
merged 1 commit into from Dec 27, 2021

Conversation

radarhere
Copy link
Member

@radarhere radarhere commented Dec 27, 2021

In Image.py, we have

Pillow/src/PIL/Image.py

Lines 159 to 160 in 11c536b

# resampling filters (also defined in Imaging.h)
NEAREST = NONE = 0

Pillow/src/PIL/Image.py

Lines 170 to 171 in 11c536b

# dithers
NEAREST = NONE = 0

and

Pillow/src/PIL/Image.py

Lines 139 to 141 in 11c536b

# Constants
NONE = 0

I can't see any use for the last one, so this PR suggests removing it. This does not change any functionality, since the other two code blocks still define Image.NONE.

@hugovk hugovk merged commit 282d825 into python-pillow:main Dec 27, 2021
49 checks passed
@radarhere radarhere deleted the none branch Dec 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants