SHARE
TWEET

Untitled

a guest Nov 22nd, 2019 74 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. def mirrorOrizz(pict): #mirroring orizzontale dall'alto verso il basso
  2. #@param pict:picture
  3.   height=getHeight(pict)
  4.   mirror=height/2
  5.   for x in range (0,getWidth(pict)):
  6.     for y in range(0,mirror):
  7.       abovePixel=getPixel(pict,x,y)
  8.       underPixel=getPixel(pict,x,height-1-y)
  9.       color=getColor(abovePixel)
  10.       setColor(underPixel,color)
  11.  
  12.  
  13.  
  14. def mirrorOrizz2(pict): #Mirroring orizzontale dal basso verso l'alto
  15. #@param pict:picture
  16.   height=getHeight(pict)
  17.   mirror=height/2
  18.   for x in range (0,getWidth(pict)):
  19.     for y in range(mirror,getHeight(pict)):
  20.       bottomPixel=getPixel(pict,x,y)
  21.       topPixel=getPixel(pict,x,height-1-y)
  22.       color=getColor(bottomPixel)
  23.       setColor(topPixel,color)
  24.      
  25. def mirrorVertical(pict):
  26. #@param pict:picture
  27.   width=getWidth(pict)
  28.   mirror=width/2
  29.   for y in range (0,getHeight(pict)):
  30.     for x in range(0,mirror):
  31.       leftPixel=getPixel(pict,x,y)
  32.       rightPixel=getPixel(pict,width-1-x,y)
  33.       color=getColor(leftPixel)
  34.       setColor(rightPixel,color)
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top