Here we are providing basic tutorial in Tkinter to use images in Tkinter programs.

Consider this code

from tkinter import *

root = Tk()

photo = PhotoImage(file="logo.png")
label = Label(root, image=photo)


In above code, an object photo is being initialized to PhotoImage pre-defined function with a parameter file for telling the path of the image file. Image cannot be displayed directly, so a label must be used to display images. A Label namely label is created with parameter image that is initialized to object photo.