3
I have a problem trying to overwrite an existing image in Python 3.
from tkinter import *
jan = Tk()
jan.geometry("500x500")
jan.configure(background="#f0f0f0")
head = PhotoImage(file = "rosto0.png")
label = Label(jan, image = head)
label.place(x=100 , y=10)
def crt():
head2 = PhotoImage(file = "rosto1.png")
lbl = Label(jan, image = head2)
lbl.place(x=100 , y=10)
crt = Button(jan, text="TROCAR ROSTO", font=("Centurty Gothic",10),
command=crt)
crt.place(x=5, y=10)
jan.mainloop()
Even if I place the image in a different position than the other one the image n appears in itself but occupies space
– Marcos Lorhan