Hello there,

I’m having an odd moment with trying to get pixels from an image in instance mode. I’m unable to reference the image as one would normally >>> let pix = p.img.get(p.x, p.y);

What am I doing wrong? Any pointers or a solution would be much appreciated.

Thank you,

Mark

```
let psystem1 = function( p) {
let img;
let x, y;
p.preload = function(){
p.img = p.loadImage("../datas/astro.png")
}
p.setup = function() {
p.createCanvas(innerWidth, innerHeight);
p.background(0);
p.imageMode(p.CENTER);
p.x = p.width/2;
p.y = p.height/2;
//p.image(p.img, p.width/2, p.height/2);
}
p.draw = function() {
let pix = p.img.get(p.x, p.y);
console.log(pix)
p.noStroke();
p.fill(pix);
p.ellipse(p.x, p.y, p.d, p.d);
p.x += p.random (-10, 10);
p.y += p.random (-10, 10);
if((p.x>=p.width)||(p.x<0)){
p.x = p.width/2;
}
if((p.y>=p.height)||(y<0)){
p.y = p.height/2;
}
}
};
let myp51 = new p5(psystem1, 'psystem1');
```