import tkinter
from tkinter import ttk
from PIL import Image, ImageTk
def decrypte():
style = ttk.Style()
style.theme_use("alt")
style.configure("green.Horizontal.TProgressbar", foreground='green', background='green')
decrypte_window = tkinter.Toplevel(root)
decrypte_window.title("Decrypt your files")
decrypte_window.geometry("900x700")
area_decrypte = tkinter.Frame(decrypte_window, bg="black", width=900, height=400)
area_decrypte.pack()
area_decrypte.pack_propagate(False)
img_hdd = ImageTk.PhotoImage(Image.open('hdd.png'))
tkinter.Label(area_decrypte, image=img_hdd, width=100, height=100).pack()
def block_all():
global root
global background
global label
decrypt = tkinter.Button(background, text="Decrypt", width=14, height=2, command=decrypte, bg="#0078FF", foreground="#fff").pack(side="right", anchor="se", pady=30, padx=60)
root.mainloop()
root = tkinter.Tk()
root.geometry("1100x900")
background = None
block_all()
I want to display an image at the top level, but I noticed that my image is not displayed, the path is correct. I realized that the problem is at the top level, how can I display an image at the top level with tkinter?