Advertisement
Guest User

Untitled

a guest
May 26th, 2019
145
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1. from PIL import Image
  2.  
  3. user_choice=input("Fichier à ouvrir ? ")
  4.  
  5. image_base=Image.open(user_choice)
  6. image_base.show()
  7. final_image=image_base.copy()
  8.  
  9. for i in range(image_base.size[0]):
  10. for j in range(image_base.size[1]):
  11.  
  12. p=image_base.getpixel((i,j))
  13.  
  14. final_image.putpixel((i,i-j),p)
  15. final_image.show()
  16. fichierfinal='Retouche'+user_choice
  17. final_image.save(fichier_final)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement