Weird ofImage.loadImage() issue

I am using an ofImage to draw an image on the screen. I load it using loadImage().
The image is in PNG format and contains an alpha channel so before drawing it I set the blending mode to alpha.
Anyway, in the simulator everything works fine. The image is loaded and the transparency is there.

However, when I try on the device, the image is not even loaded and I just get a black image. I know that the image is not loaded because I print it’s dimensions after loading and I get 0,0 (while in the simulator I get 20,20 which is the normal one).

I have tried cleaning all targets etc… Is there anything else I could be doing wrong?

Hey, I’m guessing this is for iphone?

The problem you are having is normal and the reason/solution is mentioned here
http://wiki.openframeworks.cc/index.php-…-ng-problem

loadImage returns a boolean to indicate if the image loaded ok, maybe print that out too.

Also, I think your question is missing some information. I’m assuming that by ‘simulator’ and ‘device’, you mean your running this on an iPhone?

Maybe there is some difference in assumed directory paths to where the binary is running on the device.

Yes, it is for the iPhone :slight_smile: I’m sorry I forgot to mention that.

I actually came back to let you know that I found the solution but it is what Memo said exactly. I was importing the images in a “group” rather than a “folder reference”.

Thanks again.