get("#348") -- rgb functions function makeIcon(img) local x, y, w, h = 0, 0, img.width, img.height -- full image lines = {} for yy=y, y+h-1 do local line = {} for xx=x, x+w-1 do pix = img.getInt(xx, yy) b = math.floor(bright(rgb(pix))*25+0.5) table.insert(line, string.char(string.byte("A")+b)) end table.insert(lines, table.concat(line)) end return table.concat(lines, ".") end
Began life as a copy of #382
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