Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local function showImage(monitor, file)
- local mon = peripheral.wrap(monitor)
- term.redirect(mon)
- local image = paintutils.loadImage(file)
- paintutils.drawImage(image, 1, 1)
- term.redirect(term.native)
- end
- local args = {...}
- if #args == 2 then
- if fs.exists(args[2]) then
- showImage(args[1], args[2])
- else
- print("Image Not Found")
- end
- else
- print("Usage: showimage <monitor> <image>")
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement