7. ImageChops darker
7.1. Darker
Use the
ImageChops.darker(image1, image2)
to compare the two images, pixel by pixel, and returns a new image containing the darker values.out = min(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.darker(im1, im2)
im_out.save("chops/darker.png")