11. ImageChops lighter
11.1. Lighter
Use the
ImageChops.lighter(image1, image2)
method to compare the two images, pixel by pixel, and returns a new image containing the lighter values.out = max(image1, image2)
from PIL import Image, ImageChops
with Image.open("test_images/crosses.png") as im1:
with Image.open("test_images/circles.png") as im2:
im_out = ImageChops.lighter(im1, im2)
im_out.save("chops/lighter.png")