Advertisement
Guest User

Untitled

a guest
Oct 18th, 2012
321
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. def mirrorHorizontal(picture):
  2. height = getHeight(picture)/2
  3. for x in range(0, getWidth(picture)):
  4. for y in range(0, height):
  5. topPixel = getPixel(picture, x, y)
  6. bottomPixel = getPixel(picture, x, height - y - 1)
  7. color = getColor(bottomPixel)
  8. setColor(topPixel, color)
  9. color = getColor(topPixel)
  10. setColor(bottomPixel, color)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement