OF_ERROR: Couldn't load image. Help?

Hi, I’m a Processing enthusiast new to oF and trying to get some basic stuff working. I am stuck trying to load an image— how basic can we get?

Header has:

ofImage _image;  

Then, in my setup() I have:


Which compiles fine, but then I get at runtime:

OF_ERROR: Couldn't load image from circle.png  
OF_ERROR: getTextureData() - texture has not been allocated  

What gives? I’ve tried all sorts of path-messing-about, making sure the circle.png file is in fact in my Xcode project, etc. Is there something I have to do to prepare the ofImage before loading something? I looked into the actual method definition and it looks like the loadImage function does its own allocation automatically…


Are you sure that your image is located in bin/data folder?

1 Like

Got it!


I thought it was ok to just to


but, no. Now I know.

(for the record:


works fine too.)