Answers for "how to open image using pil in tkinter"

1

show image in tkinter pillow

import tkinter as tk
from PIL import Image, ImageTk

root = tk.Tk()
img = Image.open("path//to//imgage.jpg")
img = img.resize((250, 250))
tkimage = ImageTk.PhotoImage(img)
tk.Label(root, image=tkimage).grid()
Posted by: Guest on October-02-2020

Python Answers by Framework

Browse Popular Code Answers by Language