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_alpha.py 815B

12345678910111213141516171819202122232425262728293031
  1. #!/usr/bin/python
  2. # coding: utf-8
  3. import Image
  4. import sys
  5. import ImageDraw
  6. from PIL.Image import composite,LINEAR
  7. # MILLISECONDES
  8. from datetime import datetime
  9. dt = datetime.now()
  10. dt.microsecond
  11. im1 = Image.open(str(sys.argv[1])).convert('RGBA')
  12. im2 = Image.open(str(sys.argv[2])).convert('RGBA')
  13. im3 = Image.new("1", (512,512), "white")
  14. draw = ImageDraw.Draw(im3)
  15. draw.ellipse(((100,100),(200,200)), fill="black")
  16. draw.ellipse(((180,180),(300,300)), fill="black")
  17. scriptpy = str(sys.argv[1])
  18. script = scriptpy[:-4]
  19. heure = str(dt.hour)+"h"+str(dt.minute)+"m"+str(dt.second)+"s"+str(dt.microsecond)+"ms"
  20. im1.paste(im2, im3)
  21. im1.save(script+".1.alpha."+heure+".png",'PNG', quality=100)
  22. im2.save(script+".2.alpha."+heure+".png",'PNG', quality=100)
  23. im3.save(script+".3.alpha."+heure+".png",'PNG', quality=100)