Answers for "button tkinter image"

4

button tkinter image

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