Advertisement
Guest User

Untitled

a guest
Jul 28th, 2017
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.26 KB | None | 0 0
  1. function reverseImage(img)
  2.   local rev = Image.createEmpty(img:width(), img:height())
  3.   for i = 1, img:width() do
  4.     for j = 1, img:height() do
  5.       local color = img:pixel(i-1, j-1)
  6.       rev:pixel(img:width()-i, j-1, color)
  7.     end
  8.   end  
  9.   return rev
  10. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement