November 2018
Intermediate to advanced
492 pages
12h 19m
English
An image can be superimposed on top of another by multiplying two input images (of the same size) pixel by pixel. The next code snippet shows an example:
im1 = Image.open("../images/parrot.png")im2 = Image.open("../images/hill.png").convert('RGB').resize((im1.width, im1.height))multiply(im1, im2).show()
The next figure shows the output image generated when superimposing two images by running the preceding code snippet:

Read now
Unlock full access