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

Support more affine expression forms in im.point(), deprecate Image.coerce_e #6254

Merged
merged 5 commits into from May 19, 2022

Conversation

benrg
Copy link
Contributor

@benrg benrg commented May 1, 2022

In modes I and F, Image.point only supported affine expressions of the forms (lambda x:) x * a, x + a, and x * a + b. Expressions like 1 - x had to be written x * -1 + 1.

This rewrite, though still limited to affine transformations, supports far more expression forms, including 1 - x, (2 * x + 1) / 3, etc.

@radarhere
Copy link
Member

Thanks. I've created benrg#1 with some suggestions.

benrg and others added 3 commits May 3, 2022 13:05
In modes I and F, Image.point only supported affine expressions of the
forms (lambda x:) x * a, x + a, and x * a + b. Expressions like 1 - x
had to be written x * -1 + 1.

This rewrite, though still limited to affine transformations, supports
far more expression forms, including 1 - x, (2 * x + 1) / 3, etc.
* Removed unused import

* Restored existing checks

* Restored coerce_e, _E and data property

* Deprecated coerce_e

Co-authored-by: Andrew Murray <radarhere@users.noreply.github.com>
@radarhere radarhere changed the title Support more affine expression forms in Image.point Support more affine expression forms in im.point() May 9, 2022
@radarhere radarhere merged commit 80782bb into python-pillow:main May 19, 2022
@hugovk hugovk changed the title Support more affine expression forms in im.point() Support more affine expression forms in im.point(), deprecate Image.coerce_e Apr 2, 2023
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.

None yet

2 participants