Thank you for this! Works perfectly!
I am now trying to enlarge an image when hovered over.
I have added the following to the beginning of the code:
int FULL_SIZE = 1200;
Originally I had this to get a specific image to enlarge:
if ((mouseX > 0 && mouseX < 600)&&(mouseY>0 && mouseY<600)) {
image(img[1], 500, 500, FULL_SIZE, FULL_SIZE);
}
Is the following then the right way to get the random image placed there and enlarge it? I’m just struggling to find exactly where to put it.
if ((mouseX > 0 && mouseX < 600)&&(mouseY>0 && mouseY<600)) {
image(img.get(), 500, 500, FULL_SIZE, FULL_SIZE);
}