We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpSyntax Questions › Question/Help about directories of Images
Page Index Toggle Pages: 1
Question/Help about directories of Images (Read 514 times)
Question/Help about directories of Images
Apr 7th, 2010, 11:29am
 
Hello forum ,

Well im actually using processing in eclipse and it has been working good , today i start to work with images , but when run the program said cant find the image , well my code is this...

PImage backgroundImage;
backgroundImage = loadImage("./data/sea.jpg");

ERROR :

The file "sea.jpg" is missing or inaccessible, make sure the URL is valid or that the file has been added to your sketch and is readable.

the carpets are like this:

Proyect
   -src
      -Processing
           - Test.java
   -bin
   -lib
   -data
      - sea.jpg

any ideas ? maybe there is something i dont know on method loadImage("");

Thanks !!! Cool
Re: Question/Help about directories of Images
Reply #1 - Apr 8th, 2010, 4:45am
 
Processing's load functions pre-add the 'data' part of the path, try changing it to just loadImage("sea.jpg");
Page Index Toggle Pages: 1