-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Cleanup transforms #1941
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
Cleanup transforms #1941
Conversation
|
Changes Unknown when pulling 5756321 on uploadcare:cleanup-transforms into * on python-pillow:master*. |
add section cookie for affine_fixed
float-point value of radians which cos will exactly 0.
rename to ImagingGenericTransform
|
rebased |
PIL/Image.py
Outdated
| data = (xs, 0, x0 + xs/2, 0, ys, y0 + ys/2) | ||
|
|
||
| elif method == PERSPECTIVE: | ||
| # change argument order to match implementation |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This comment doesn't apply anymore, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, removed
|
Links to commits in the description are updated. |
Internal transform API was very confusing. For example,
rotatemethod was callingself.transformorself.im.rotatedepends onexpandargument, butself.im.rotateinternally also callsImagingTransformAffine, so it was excessive.Changes proposed in this pull request:
transposeoperations if it is possible regardless of filter. 8203a43cos(90°)now is exactly 0, not 6.123e-17. 7687ce8Image.rotatealways usesself.transform, soim.rotatewas removed from core library. 709078e 1f8c252ImagingTransformAffine,ImagingTransformPerspectiveandImagingTransformQuadwas replaced with one entry point to all transformations:ImagingTransform. FormerImagingTransformwas renamed toImagingGenericTransformand removed from extern symbols (Imaging.hfile). 6be3df2 9902d2e