Hi I would appreciate if you told what's wrong with this code? I wanted to change the label image when button is pressed. After I press the button it just shows blank white image. Any help appreciated MY code:
def browseFiles():
filename = filedialog.askopenfilename(initialdir = "C:/Users/Osman/VSC/python/", title = "Select
a File", filetypes = (("Image files", ("*.jpg*","*.png"),), ("all files","*.*")))
fff=Image.open(filename)
fff=fff.resize((230,250),Image.ANTIALIAS)
temp_img=ImageTk.PhotoImage(fff)
label_blank.configure(image=temp_img)
default=Image.open('blank.png')
default=default.resize((300,250),Image.ANTIALIAS)
filename_blank=ImageTk.PhotoImage(default)
label_blank=tk.Label(win,image=filename_blank)
label_blank.image=filename_blank
label_blank.place(x=130,y=150,height=230,width=250)
button_explore = tk.Button(win,text = "Select input Image", command = browseFiles)
button_explore.place(x=200,y=400)