Pillow
Pillow copied to clipboard
Return boolean from ImageMath comparison operations
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.