Where put images with Processing in Eclipse for Android

edited October 2013 in Android Mode

Hi guys, I'm developing an app for Android for an universitary project, and I need to develop it with Processing in Eclipse because i need PureData with libpd.

Now I need to include some png images in the project, and I don't know where to put them. In processing I put them in "data" folder and it works very well on Android.

To call images I use

public class mySketch extends PApplet {

    public PImage image;

    public void setup() {
        image = loadImage("image.png");
    }

    public void draw() {
        ...
    }
}

But it give me the error that it can't find "image.png"...

I tryed to put them in "data" folder, in assets, bin, libs, res, raw folder, within and without data folder and "images" folder. I tried everything as I did a search on Google and found other with the same problem.

Thanks a lot to everyone

Answers

  • edited October 2013 Answer ✓

    It should be the assets folder. If that isn't working, then maybe try calling loadImage(dataPath("image.png")); instead.

  • edited October 2013

    I resolved putting all images in assets folder, without data folder.

    So images are in "/assets/image.png". It works, but I don't know it if is the correct way

Sign In or Register to comment.