I have 2 images, in png format. The second image, is a shape with transparent background.
First image:
Second image:
I cannot make the second image on top of the first at given coordinates (x,y) with the first image visible through the transparent zone of the second image.
Result desired:
import Tkinter
import Image, ImageTk
# open an image
head = Image.open('background2.png')
hand = Image.open('foreground2.png')
root = Tkinter.Tk() # A root window for displaying objects
head.paste(hand,(20,20))
# Convert the Image object into a TkPhoto object
tkimage = ImageTk.PhotoImage(head)
root.mainloop() # Start the GUI
An empty tk window is displayed.