when you are in processing, hit ctrl-k to open your folder.
Here you can place your images. Name it shells.jpg
(place it in the folder or create a new folder data and place it there).
then you can say:
size(400,400);
PImage img;
img = loadImage("shells.jpg");
image(img, 0, 0);
When you have a program with setup() and draw() you want:
PImage img; // global scope
void setup() {
size(400,400);
img = loadImage("shells.jpg"); // load
}
void draw() {
image(img, 0, 0); // use
}
this means, load once, use often which is much more efficient than to load in draw().
When you have images in different folders you need to give the full path.
final String pathImg = "D:\\texts\\img.jpg"; // path
PImage img; // global scope
//-------------------------------------------------------
void setup() {
size(1400, 800);
img = loadImage(pathImg); // load
}
void draw() {
image(img, 0, 0); // use
}
you can also have a list / array of images