Problème Pil : AttributeError: 'tuple' object has no attribute '
shooter7223fr
Messages postés
17
Statut
Membre
-
Someone -
Someone -
Bonjour à tous.
J'ai un problème et il faut à tout pris que j'arrive a le résoudre au plus vite!!!
Dans ma fonction qui me permet de revenir a la valeur de la variable précédente, j'ai une erreur quo survient lors lors de la modification de la valeur du tableau:
Exception in Tkinter callback
Traceback (most recent call last):
File "C:\Python33\lib\tkinter\__init__.py", line 1442, in __call__
return self.func(*args)
File "C:\Users\nom\Desktop\ISN Modificateur Image\Image deforme.py", line 643, in Precedant
image2 = image1.resize([int(half*t) for t in image1.size])
AttributeError: 'tuple' object has no attribute 'resize'
voici le code de ma fonction :
def Precedant():
global image1
global P
P = P-1
if (L>w) and (H>h) and (P>=0):
image1 = tableau[P]
image2 = image1.resize([int(half*t) for t in image1.size])
imageP = ImageTk.PhotoImage(image2)
imageL = Tk.Label(image=imageP)
imageL.image = imageP
imageL.pack()
imageL.place(relx=1, x=-670, y=120, anchor=Tk.N,height=h-100,width=w)
if (L<=w) and (H<=h) and (P>=0):
image1 = tableau[P]
imageP = ImageTk.PhotoImage(image1)
imageL = Tk.Label(image=imageP)
imageL.image = imageP
imageL.pack()
imageL.place(relx=1, x=-670, y=120, anchor=Tk.N,height=h-100,width=w)
else:
P = 0
Avez-vous une solution a mon problème ???
Merci d'avance =)!!
J'ai un problème et il faut à tout pris que j'arrive a le résoudre au plus vite!!!
Dans ma fonction qui me permet de revenir a la valeur de la variable précédente, j'ai une erreur quo survient lors lors de la modification de la valeur du tableau:
Exception in Tkinter callback
Traceback (most recent call last):
File "C:\Python33\lib\tkinter\__init__.py", line 1442, in __call__
return self.func(*args)
File "C:\Users\nom\Desktop\ISN Modificateur Image\Image deforme.py", line 643, in Precedant
image2 = image1.resize([int(half*t) for t in image1.size])
AttributeError: 'tuple' object has no attribute 'resize'
voici le code de ma fonction :
def Precedant():
global image1
global P
P = P-1
if (L>w) and (H>h) and (P>=0):
image1 = tableau[P]
image2 = image1.resize([int(half*t) for t in image1.size])
imageP = ImageTk.PhotoImage(image2)
imageL = Tk.Label(image=imageP)
imageL.image = imageP
imageL.pack()
imageL.place(relx=1, x=-670, y=120, anchor=Tk.N,height=h-100,width=w)
if (L<=w) and (H<=h) and (P>=0):
image1 = tableau[P]
imageP = ImageTk.PhotoImage(image1)
imageL = Tk.Label(image=imageP)
imageL.image = imageP
imageL.pack()
imageL.place(relx=1, x=-670, y=120, anchor=Tk.N,height=h-100,width=w)
else:
P = 0
Avez-vous une solution a mon problème ???
Merci d'avance =)!!
A voir également:
- Attributeerror: 'nonetype' object has no attribute 'send'
- Pc pil - Guide
- Superposer deux images sans le module PIL - Forum Python
- Problème pile - Forum C
- Problème pile guitare - Forum Audio
- Problème piles télécommande philips ambilight - Forum Téléviseurs