We are about to switch to a new forum software. Until then we have removed the registration on this forum.
Hi all !
I've created a code and i have one mistake.
My code is divide like this :
void settings () {
...
}
void setup () {
...
}
void draw () {
...
}
void mouseClicked () {
...
}
public Class SecondApplet extends PApplet {
public void settings () {
...
}
public void setup () {
...
}
public void draw () {
images=loadImage("images.jpg")
}
My question is : What is the path to put this "images.jpg" ? Because when I put "images.jpg" in the root folder, it doesn't work
Thank you all ! :)
Answers
You shouldn't be loading images inside draw().
Don't load images inside draw().
Don't load images inside draw().
oh and why ? :o
That said (HECK! ONE MORE TIME SO IT SINKS IN: DO NOT LOAD IMAGES INSIDE DRAW!!!), The default path is to a "data" folder in the same location as the sketch is located.
The code inside draw() runs about 60 times each second. There is no need to reload the same image into memory over 60 times each second. You should just make your PImage variable global and load the image one time, inside setup().
https://forum.Processing.org/two/discussions/tagged/--sketch-path
No its more complicate, in my draw, i call "void boucle ()" and inside I have condition to load an image, i know this. I forgot to detail sorry. But now my question is what is the folder who is listed "images.jpg"