Search code examples
pythontkinterphotoimage

Make image full screen with PhotoImage


I've tried this but it doesn't help: Image resize under PhotoImage

I already have this:

import tkinter
root = tkinter.Tk()
root.attributes("-fullscreen", True)
photo = tkinter.PhotoImage(file="image.gif")
img1 = tkinter.Label(root, image = photo)
img1.pack()
root.mainloop()

This works but my image doesn't take up the full screen and I wanted to know how to resize it to full screen.


Solution

  • I realised it is not possible to do this and I will try to use PIL. Thanks to @BryanOakley for helping me with this question.