Files
2026-04-11 18:25:45 +01:00

19 lines
419 B
Python

from PIL import Image
# Opening the primary image (used in background)
img1 = Image.open(r"images/portrait1.png")
# Opening the secondary image (overlay image)
img2 = Image.open(r"images/credit_agricole.png")
img1 = img1.resize((300, 300))
img2 = img2.resize((300, 300))
# Pasting img2 image on top of img1
# starting at coordinates (0, 0)
img1.paste(img2, (0,0), mask = img2)
# Displaying the image
img1.show()