Problems with PImage
in
Programming Questions
•
2 years ago
Hi, I am using Processing's default image library PImage and I am referring to the examples online on how to use it:
I currently am working on a character and I am trying to load some images (I have a data folder called data where I have all of my images stored which is what the reference said I should do) The problem I have is when I use setup and void, (without them the image loads well). I get an error message NullPointerException and I am not sure why as I am following the exact model used in the reference.
The name of file I am referring to, the image, is correct.
You can find my code below. Thank you,
Alan
-
PImage furryBall;
void setup() {size(600,600);// Loading Images for JoefurryBall = loadImage("FurryBall(426-418).png");}
void start() {image(furryBall, 0, 0);}
1