Commit e906902b authored by Abdessamad Akabli's avatar Abdessamad Akabli

Dernière update.

- Modification rotation couleurs
parent 75a23c88
......@@ -153,16 +153,16 @@ def rotation_couleurs():
image_bgr.putpixel((x,y),(rouge,vert,bleu))
image_bgr.show()
image_modifie = image_bgr.copy()
def grb():
def brg():
global image_modifie
image_grb = image_modele.copy()
image_brg = image_modele.copy()
for x in range(largeur):
for y in range(hauteur):
(rouge,vert,bleu) = image_grb.getpixel((x,y))
(rouge,vert,bleu) = (vert,rouge,bleu)
image_grb.putpixel((x,y),(rouge,vert,bleu))
image_grb.show()
image_modifie = image_grb.copy()
(rouge,vert,bleu) = image_brg.getpixel((x,y))
(rouge,vert,bleu) = (bleu,rouge,vert)
image_brg.putpixel((x,y),(rouge,vert,bleu))
image_brg.show()
image_modifie = image_brg.copy()
def gbr():
global image_modifie
image_gbr = image_modele.copy()
......@@ -177,9 +177,9 @@ def rotation_couleurs():
root.title("Traitement de l'image")
tk.Label(root, text="Quel mode de rotation colorimétrique voulez-vous ?").pack()
tk.Button(root, text=" - RBG - Rotation RGB->RBG", command = rgb).pack()
tk.Button(root, text=" - RBG - Rotation RGB->RGB", command = rgb).pack()
tk.Button(root, text=" - BGR - Rotation RGB->BGR", command = bgr).pack()
tk.Button(root, text=" - GRB - Rotation RGB->GRB", command = grb).pack()
tk.Button(root, text=" - GRB - Rotation RGB->BRG", command = brg).pack()
tk.Button(root, text=" - GBR - Rotation RGB->GBR", command = gbr).pack()
tk.Button(root, text="Retour",fg = "red", command = root.destroy).pack()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment