Hi all,
With the following sketch, the image is drawn at (140, 500). However, when I sample the image using the get() function, it acts as though the image is drawn at (0, 0). How do I correct this?
Thanks!
let colours;
function setup() {
colours = loadImage('colours.jpg');
createCanvas(700, 700);
background(0);
}
function draw() {
image(colours, 140, 500, 190, 110);
fill(colours.get(mouseX, mouseY));
noStroke();
ellipse(50, 50, 50, 50);
}