Skip to content

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 <[email protected]>
@benrg benrg force-pushed the affine-transform branch from dc9436b to 88f46f3 Compare May 3, 2022 20:43
@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.

2 participants