Les JPG dans Tkinter
pythapprenti
Messages postés
1
Statut
Membre
-
trifou -
trifou -
Bonjour, j'ai essayé de mettre un JPG sur une interface graphique mais je reçois toujours :
_tkinter.TclError: couldn't recognize data in image file "th.JPG"
Voici mon code :
# _*_ coding:Latin-1 _*
from tkinter import *
fenetre = Tk()
photo = PhotoImage(file = "voiture.JPG")
photo.pack()
Est-ce que quelqu'un sait pourquoi et comment on fait pour que ça marche ?
_tkinter.TclError: couldn't recognize data in image file "th.JPG"
Voici mon code :
# _*_ coding:Latin-1 _*
from tkinter import *
fenetre = Tk()
photo = PhotoImage(file = "voiture.JPG")
photo.pack()
Est-ce que quelqu'un sait pourquoi et comment on fait pour que ça marche ?