xxxxxxxxxx
23
/* Upload load an image. Expand the left side bar using the <
Using drop down arrow next to Sketch Files and select upload file
Drag n drop image and then close popup window once loaded
*/
// Declare variable 'img'. Maybe name your variable to be more specific
// Add a preload() function to load the image before the program runs
// inside the function use the img varibale to call loadImage()
function preload() {}
function setup() {
createCanvas(400, 300);//change size to suit your needs
// Load the image using your image variable declared above
}
function draw() {
background(0); // change to a colour mode of your own choice
image(); // image variable plus X, Y. You could then add any additional variables here including mouseX, mouseY to change the size of the image
}