The problem is my window is not showing any images that I want on the Tkinter window below is my code which I tried but some problems are occurring. the image folder is in the same folder in which the python file is and also some =thing with fp was coming up while trying to print jpg image. can someone explain what that is
from Tkinter import *
import os
from PIL import Image, ImageTk
gallery_root = Tk()
gallery_root.geometry("738x638")
for (root, dirs, files) in os.walk("/img"):
for file in files:
if file.endwith(".png"):
Label(image=PhotoImage(file=str(file))).pack()
if file.endwith(".jpg"):
Label(image=ImageTk.PhotoImage(Image.open()))
gallery_root.mainloop()