Use image as Background in Python , Code in description

Опубликовано: 11 Апрель 2026
на канале: Fast Programming
1,481
63

fastest way to Use image as Background in Python , Code in description #short #python #programming :

from tkinter import *
from PIL import ImageTk , Image

app = Tk()
app.geometry("500x300")
app.resizable(False , False )

op = Image.open('wallpaperflare.com_wallpaper.jpg')
img_res = op.resize((500,300) , Image.ANTIALIAS)
image = ImageTk.PhotoImage(img_res)

back_image = Label(app , image = image)
back_image.place(x = 0 , y = 0)

app.mainloop()