from tkinter import * from PIL import ImageTk, Image root = Tk() root.title("My Title") root.geometry("500x500") root.iconbitmap(r'icon.ico') # Open image my_img = Image.open("image.png") # Resize Image resized = my_img.resize((500, 500), Image.ANTIALIAS) new_img = ImageTk.PhotoImage(resized) # image size 1025x1025 my_label = Label(root, image=new_img) my_label.pack(pady=20) root.mainloop()
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter