hello
je suis confronter a ce problème:
#!/usr/bin/env python
# -*- coding:Utf-8 -*-
from PIL import Image, ImageTk
import Tkinter as Tk
root = Tk.Tk()
image = Image.open("/home/taz/Desktop/python/1.png")
photo = ImageTk.PhotoImage(image)
canvas = Tk.Canvas(root, width = image.size[0], height = image.size[1])
canvas.create_image(0,0, anchor = Tk.NW, image=photo)
canvas.pack()
root.mainloop()
erreur
python '/home/taz/Desktop/python/comp_kernel_tk.py'
Traceback (most recent call last):
File "/home/taz/Desktop/python/comp_kernel_tk.py", line 3, in <module>
from PIL import Image, ImageTk
ImportError: cannot import name ImageTk
et donc j’ai fait un aptitude search python-pil qui donne rien quelqu’un qui est sou *buntu l’a déja apparament:
||/ Nom Version Description
+++-====================-====================-========================================================
python-pil <néant> (aucune description n'est disponible)
je pourrait toujours aller chercher la lib a la mano seulement je voudrai utiliser une lib qui est dans synaptic et qui gère les jpg ou png
car TK ne gère pas ce type de format
Merci d’avance