Problems with loadImage("ran.png"); in processing 4.02a

<PImage paint;
paint = loadImage(“ericarose.png”); >

getting back a null pointer exception

worked fine in 4.01a

Your subject says “processing 4.02a”.

No issues here with Processing 4.0a2.

:)

So yeah the problem is with settings… I will report the bug

PImage paint;

void settings(){
//selectInput("Please select canvas:", "selectImage");

//interrupt();
paint = loadImage("ericarose.png"); 
size(paint.width, paint.height);
noSmooth();}

void setup(){

image(paint,0,0);
background(paint);}
void draw(){}

For Processing 3.54 the reference for settings() discusses this:

https://processing.org/reference/settings_.html

This may help if you want to resize the image to use as a background:

https://processing.org/reference/PImage_resize_.html

:)

yeah but I want the user to define the image and then to manipulate the image at the pixel level so that wont work…thank you for taking the time to respond