Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local image = false
- function loadImage(imgfile)
- local file = fs.open(imgfile,"r")
- local _layers = textutils.unserialise(file.readAll())
- file.close()
- local layers = {}
- for i, l in ipairs(_layers) do
- for x = 1,#l.Pixels[5] do
- local ch = l.Pixels[5]:sub(x,x)
- if ch == " " then
- pixel = {}
- print(x.." X:")
- else
- local hch = tonumber(ch,16)
- if hch then
- print(x.." X: "..math.pow(2,hch))
- end
- end
- end
- print(l.BackgroundColour)
- print(l.Index)
- end
- end
- loadImage("tests/kate")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement