Pillow icon indicating copy to clipboard operation
Pillow copied to clipboard

Return boolean from ImageMath comparison operations

Open radarhere opened this issue 1 year ago • 0 comments

from PIL import Image, ImageMath
A = Image.new("L", (1, 1))
print(ImageMath.lambda_eval(lambda args: args["A"] == args["A"], A=A))

currently gives <PIL.Image.Image image mode=I size=1x1 at 0x1047906E0>

This PR suggests changing the output to a more meaningful True.

==, !=, <, <=, >, >=, equal() and notequal() would all now return boolean results.

radarhere avatar Jul 12 '24 08:07 radarhere