Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

7
LINES

< > BotCompany Repo | #492 - Rotate 180° (image transformer)

Lua code - Image transformer

w, h = img.width, img.height
pixels = {}
for y = 0, h-1 do
  for x = 0, w-1 do
    pixels[y*w+x+1] = img.getInt(w-1-x, h-1-y)
  end
end

Author comment

Same script as #311, just different type

test run  test run with input  download  show line numbers   

Travelled to 8 computer(s): aoiabmzegqzx, cbybwowwnfue, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, tslmcundralx, tvejysmllsmz

No comments. add comment

Snippet ID: #492
Snippet name: Rotate 180° (image transformer)
Eternal ID of this version: #492/1
Text MD5: f7a7ce0e13428c071d9314bf1c3d4ead
Author: stefan
Category:
Type: Lua code - Image transformer
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2015-03-08 17:55:12
Source code size: 141 bytes / 7 lines
Pitched / IR pitched: No / Yes
Views / Downloads: 435 / 68
Referenced in: [show references]

Formerly at http://tinybrain.de/492 & http://492.tinybrain.de