0
class window(tk.Frame):
    def __init__(self, master):
        super().__init__(master)
        self.pack()
        img = Image.open(os.path.join(sys.path[0], 'example.png')).convert("RGBA")
        img = img.resize((150, 200), Image.ANTIALIAS)
        imgg = ImageTk.PhotoImage(img)
        pic = tk.Label(image=imgg)
        pic.pack()

It only shows me a white Box here is the image: https://i.stack.imgur.com/Y8h5o.jpg what can i do? :(

Marl
  • 1
  • 1
    Please provide a [mcve]. – AMC Jan 05 '21 at 02:21
  • Does this answer your question? [Why does Tkinter image not show up if created in a function?](https://stackoverflow.com/questions/16424091/why-does-tkinter-image-not-show-up-if-created-in-a-function) – acw1668 Jan 05 '21 at 02:39
  • If you wish to show a PNG image with alpha then you should use `canvas.create_image()`. – Delrius Euphoria Jan 05 '21 at 03:46

0 Answers0