1from tkinter import *
2from PIL import ImageTk, Image
3
4root = Tk()
5
6c = Canvas(root, width=500, height=500)
7c.pack()
8
9img = ImageTk.PhotoImage(Image.open(r"imagepath\imagename.extension"))
10c.create_image(x, y, image=img, anchor=NW)
1from tkinter import *
2root = Tk()
3canvas = Canvas(root, width = 300, height = 300)
4canvas.pack()
5img = PhotoImage(file="ball.ppm")
6canvas.create_image(20,20, anchor=NW, image=img)
7mainloop()
1import tkinter as tk
2window = tk()
3canvas = Canvas(window, width=300, height=300)
4image = PhotoImage('path')
5canvas.create_image(height=40, width=40, img=image)