From 3a92d4af0162d80bc13ae15efbc2e47483870d3b Mon Sep 17 00:00:00 2001 From: Andrew Murray Date: Tue, 9 Apr 2024 07:34:52 +1000 Subject: [PATCH] Replace ImageMath.eval with ImageMath.lambda_eval --- selftest.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/selftest.py b/selftest.py index ed5252c4464..661abcddb74 100755 --- a/selftest.py +++ b/selftest.py @@ -139,7 +139,9 @@ def testimage() -> None: In 1.1.6, you can use the ImageMath module to do image calculations. - >>> im = ImageMath.eval("float(im + 20)", im=im.convert("L")) + >>> im = ImageMath.lambda_eval( \ + lambda args: args["float"](args["im"] + 20), im=im.convert("L") \ + ) >>> im.mode, im.size ('F', (128, 128))