Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def mirrorHorizontal(picture):
- height = getHeight(picture)/2
- for x in range(0, getWidth(picture)):
- for y in range(0, height):
- topPixel = getPixel(picture, x, y)
- bottomPixel = getPixel(picture, x, height - y - 1)
- color = getColor(bottomPixel)
- setColor(topPixel, color)
- color = getColor(topPixel)
- setColor(bottomPixel, color)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement