You can try using the .blend
method.
For two images image1
and image2
:
from PIL import Image
image1 = Image.open(path1)
image2 = Image.open(path2)
new_image = Image.blend(image1, image2, alpha)
#save / do stuff
Alternatively, if you want to specify coordinates:
image1.paste(image2, (x, y), mask)
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.