paintutils.loadImage

From ComputerCraft Wiki
Revision as of 20:14, 10 June 2013 by 1lann (Talk | contribs) (Grammatical fix)

Jump to: navigation, search


Grid Redstone.png  Function paintutils.loadImage
Loads an image (images created with the paint program)
Syntax paintutils.loadImage(string path)
Returns table containing image data on success, otherwise nil.
Part of ComputerCraft
API paintutils

Examples

Grid paper.png  Example
The program loads the image 'bar' onto the variable 'image', and then draws it on the screen, starting at position {3, 5} by using paintutils.drawImage.
Code
image = paintutils.loadImage("bar")
paintutils.drawImage(image, 3, 5)