image

v0.0.5
loadImage(path);

Load a png or jpeg image

Arguments

pathThe local image path

Returns

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 reference
xThe x position of the image
yThe 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