Bonjour,
J'ai une image que je convertie en array grace à numpy, je modifie ensuite le matrice pour modifier l'image puis j'aimerai remettre la matrice en image mais lorsque que je veux afficher cette nouvelle image, il n'y a rien d'affiché comment faire ?
Voici un bout de mon code:
mon programme complet est ici: https://mega.nz/#!ENM2kJBB!YNeyQuIk-...o8Vmwwx69ox3h0
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 ph=Image.open(filename) filter(ph) def filter(ph) tabPix=np.array(ph) print tabPix for i in tabPix: tabPix[i]=tabPix[i]*(1/9) print tabPix img = Image.fromarray(tabPix) img_tk= ImageTk.PhotoImage(img) display(img_tk) def display(img) img2=Canvas.create_image(photo.width()+10,20, anchor=NW,image=img)
Merci d'avance
Partager