This is my python 3 code, here i want to get images in tkinter window by defining function for adding image but image is not loading
from tkinter import *
import time
import os
from PIL import Image, ImageTk
splash_root = Tk()
splash_root.title("splash screen")
splash_root.geometry("1000x600")
def main_window():
c = Canvas(splash_root, width=1000, height=600, background='white')
c.pack()
p1 = ImageTk.PhotoImage(file="front.gif")
c.create_image(0, 0, image=p1, anchor="nw")
main_window()
mainloop()