Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

how to draw image in tkinter

from tkinter import *
from PIL import ImageTk, Image

root = Tk()

c = Canvas(root, width=500, height=500)
c.pack()

img = ImageTk.PhotoImage(Image.open(r"imagepathimagename.extension"))
c.create_image(x, y, image=img, anchor=NW)
 
PREVIOUS NEXT
Tagged: #draw #image #tkinter
ADD COMMENT
Topic
Name
7+8 =