Fix bicubic stretch interpolation#970
Merged
wiredfool merged 4 commits intopython-pillow:masterfrom Nov 6, 2014
homm:fix-bicubic-stretch
Merged
Fix bicubic stretch interpolation#970wiredfool merged 4 commits intopython-pillow:masterfrom homm:fix-bicubic-stretch
wiredfool merged 4 commits intopython-pillow:masterfrom
homm:fix-bicubic-stretch
Conversation
Member
|
Please can you add tests? This bit of code isn't currently covered by any tests and it's good to improve as we go along. Apt there was an old comment |
Member
Author
Member
Author
|
@hugovk done. |
Merged
Member
Author
|
It is better to merge this request before looking at #977 |
Member
There was a problem hiding this comment.
Checked this to correspond with wikipedia link.
wiredfool
added a commit
that referenced
this pull request
Nov 6, 2014
Fix bicubic stretch interpolation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.




This fixes incorrect result for Bicubic interpolation in
im.stretch, discovered by me in comment: #964 (comment)The error was in line: https://github.com/python-pillow/Pillow/blob/master/libImaging/Antialias.c#L76
Third item was
8*xwhile should be8*a*x(see there).Scale down before and after PR:


Scale up before and after PR:


Source code