代码如下:
from PIL import Image from PIL import ImageChops im1 = Image.open('first_card.jpg') im2 = Image.open('second_card.jpg') im3 = ImageChops.invert(im2) Image.blend(im1,im3,0.5).show()
输出如下: