Ce projet essai, en partant d'une IMAGESOURCE de : - appliquer des effets à l'image - la redimmensionner - changer son mode de couleur - la HAACHEER...
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

0_motif.py 746B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. #!/usr/bin/python
  2. # coding: utf-8
  3. def pr3nt():
  4. print hello
  5. '''
  6. import sys
  7. import Image
  8. import random
  9. import os
  10. import ImageDraw
  11. import ImageFont
  12. import ImageFilter
  13. from time import gmtime, strftime
  14. # MILLISECONDES
  15. from datetime import datetime
  16. dt = datetime.now()
  17. dt.microsecond
  18. heure = str(dt.hour)+"h"+str(dt.minute)+"m"+str(dt.second)+"s"+str(dt.microsecond)+"ms"
  19. image = Image.new("RGBA",(512,512), "black")
  20. h = image.size[0]
  21. l = image.size[1]
  22. motif = ImageDraw.Draw(image)
  23. def motifs(image):
  24. n = 0
  25. ecart = 20
  26. tranches = h / ecart
  27. while n < tranches :
  28. rx = random.randint(0,l/2)
  29. image.rectangle(((rx,n*tranches),(rx+l/2,n*tranches+tranches)),"white")
  30. n = n + 1
  31. motifs(motif)
  32. image.save(heure+".png",'PNG', quality=100)
  33. '''