16 posts
Posted 02 May 2013 - 04:26 PM
local mon = peripheral.wrap("right")
local img = paintutils.loadImage(".logo")
term.redirect(mon)
paintutils.drawImage(img, 1, 1)
term.restore()
is there a way i can call the image from a n'paint pro
173 posts
Posted 03 May 2013 - 01:06 AM
Assuming n'paint pro made the image file ".logo" it will call it. Your problem is that there is no delay between putting image on the monitor and restoring it back to the terminal.
4 posts
Posted 08 May 2013 - 06:19 PM
First do the command "paint test" then save that paint and do the following code to display:
m = peripheral.wrap("top")
local test = paintutils.loadImage("test")
local function drawTest()
term.redirect(m)
term.clear()
paintutils.drawImage(test,1,1)
sleep(1)
term.restore()
end
drawTest()
This works for me, and I run FTB Ultimate 1.0.2.
7508 posts
Location
Australia
Posted 09 May 2013 - 12:01 AM
I suggest you try this code OP.
local monObj = peripheral.wrap('right')
local image = paintutils.loadImage('.logo')
if not monObj then
error('There was no monitor on the right, maybe its left', 0)
end
if not image then
error('The image was no loaded, does that file exist?', 0)
end
term.redirect(monObj)
paintutils.drawImage(image, 1, 1)
term.restore()
paintutils.drawImage(image, 1, 1)
The above code should draw it on the monitor and on the terminal. The NPaintPro save files WILL interchangeably work with the paint files as when NitrogenFingers made paint, and then made NPaintPro he made sure that for basic pictures it saved in the same manner (in hexadecimal 0-f)
Your problem is that there is no delay between putting image on the monitor and restoring it back to the terminal.
Not the problem at all. The program does not move from one function call to the next until the currently running call has completed.
671 posts
Location
That place over there. Y'know. The one where I am.
Posted 09 May 2013 - 02:46 AM
Usually NPP saves files with a .nfp extension. You may want to try:
local img = paintutils.loadImage(".logo.nfp")