Advertisement
Guest User

logohost.lua

a guest
Apr 22nd, 2019
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.67 KB | None | 0 0
  1. local image = false
  2.  
  3. function loadImage(imgfile)
  4.  
  5.   local file = fs.open(imgfile,"r")
  6.   local _layers = textutils.unserialise(file.readAll())
  7.   file.close()
  8.  
  9.   local layers = {}
  10.  
  11.   for i, l in ipairs(_layers) do
  12.  
  13.       for x = 1,#l.Pixels[5] do
  14.           local ch = l.Pixels[5]:sub(x,x)
  15.           if ch == " " then
  16.               pixel = {}
  17.               print(x.." X:")
  18.           else
  19.               local hch = tonumber(ch,16)
  20.               if hch then
  21.                   print(x.." X:  "..math.pow(2,hch))
  22.               end
  23.           end
  24.       end
  25.       print(l.BackgroundColour)
  26.       print(l.Index)
  27.   end
  28.  
  29. end
  30.  
  31.  
  32.  
  33. loadImage("tests/kate")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement