Blend overlapping images in python
问题 I am taking two images in python and overlapping the first image onto the second image. What I would like to do is blend the images where they overlap. Is there a way to do this in python other than a for loop? 回答1: PIL has a blend function which combines two RGB images with a fixed alpha: out = image1 * (1.0 - alpha) + image2 * alpha However, to use blend , image1 and image2 must be the same size. So to prepare your images you'll need to paste each of them into a new image of the appropriate