I'm using Eclipse with processing 1.2.1, and I can't seem to access PImage's loadImage method. I have imported the .jar successfully into the build path, and I have been able to run the other examples in the tutorials without a hitch.
import processing.core.*;
public class Test {
void setup() {
PImage img = loadImage("test.jpg", "jpg");
}
}
On line 4, "loadImage" is underlined red. The error reads:
The method loadImage(String, String) is undefined for the type Test
I've also tried doing it other ways, e.g.:
PImage img; //also tried PImage img = new PImage();
img = loadImage("test.jpg", "jpg");
I also tried these without the second parameter (which should not make a difference anyway if I read the documentation correctly). Same result with anything I try... It just doesn't seem to resolve PImage's loadImage method.