-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
RGBA Image.resize with Nearest Neighbor Interpolation introduces new RGB Values #5300
Comments
This may not be related, but Pillow 6.2.1 is a bit old. Is there any reason you haven't upgraded to a newer Pillow version? |
The version is fixed for the project I am working on but it's also happening with Pillow 8.1.0. Maybe issue #4516 is related? |
You'll likely think this is a basic question, but could you link me to something explaining that nearest neighbor interpolation shouldn't introduce new values? |
From https://pillow.readthedocs.io/en/stable/handbook/concepts.html#PIL.Image.NEAREST:
I would interpret that as meaning that each pixel in the output will be equal to one of the original pixels, i.e. not introducing new values. |
I've created #5304 to disable premultiplying with NEAREST resampling. |
What did you do?
Resizing an RGBA image with Image.resize and nearest neighbor interpolation.
What did you expect to happen?
Image resized to given size, no new RGB values introduced.
What actually happened?
New RGB values introduced.
What are your OS, Python and Pillow versions?
Python Example
The text was updated successfully, but these errors were encountered: