Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def squarePict(pict, x):
- #@param pict: picture
- #@param x: int
- if(getWidth(pict)==getHeight(pict)):
- for i in range(getWidth(pict)):
- for j in range(getHeight(pict)):
- pxc=getPixel(pict, x, i)
- pxr=getPixel(pict, j, x)
- c=getColor(pxc)
- r=getColor(pxr)
- setColor(pxc, r)
- setColor(pxr, c)
- show(pict)
- else: show(pict)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement