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

18
LINES

< > BotCompany Repo | #181 // b/w image decompressor

Lua code

get("#179") -- base64

function uncompress(s)
  s = decode64(s)
  local pixels = {}
  for i=1, #s do
    local b = s:byte(i)
    --print(b)
    for j=0, 7 do
      if b >= 128 then
        pixels[i*8-7+j] = -1
        b = b-128
      end
      b = b*2
    end
  end
  return pixels
end

Author comment

Used for unpacking images compressed with #180

test run  test run with input  download  show line numbers   

Travelled to 12 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Image recognition results

Recognizer Recognition Result Visualize Recalc
#308 302 [visualize]

Snippet ID: #181
Snippet name: b/w image decompressor
Eternal ID of this version: #181/1
Text MD5: b08c79346cb50781e95b48432c5e8324
Author: stefan
Category:
Type: Lua code
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2014-01-16 04:29:50
Source code size: 302 bytes / 18 lines
Pitched / IR pitched: Yes / Yes
Views / Downloads: 874 / 13960
Referenced in: [show references]