image
v0.0.6loadImage(path);Load a png or jpeg image
Arguments
pathThe local image pathReturns
imgThe image reference function setup()
createWindow(600, 600);
img = loadImage('/path/to/mypic.png');
end
function draw()
background(51);
image(img, 0, 0);
end image(image, x, y, [w], [h]);Draw an image to the screen
Arguments
imageThe image referencexThe x position of the imageyThe y position of the image[w]The width of the image, if not specified, using source width[h]The height of the image, if not specified, using source height