Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function reverseImage(img)
- local rev = Image.createEmpty(img:width(), img:height())
- for i = 1, img:width() do
- for j = 1, img:height() do
- local color = img:pixel(i-1, j-1)
- rev:pixel(img:width()-i, j-1, color)
- end
- end
- return rev
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement