1 | initial version |
import image module from pillow
from PIL import Image
open the image
Image1 = Image.open('your image 1')
make a copy the image so that the original image does not get affected
Image1copy = Image1.copy() Image2 = Image.open('your image 2') Image2copy = Image2.copy()
paste image giving dimensions
Image1copy.paste(Image2copy, (70, 150)) # pick your coordinates
save the image
Image1copy.save('D:\pasted2.png')
2 | No.2 Revision |
Code:
import image module from open
make
paste
save the image
Image1copy.save('D:\pasted2.png')