Check out XCode's 'Build Phases' that your images are included in 'Copy Bundle Resources' so that when you do a build your image resources are properly copied inside your bundle.
Then check out this URL on loading image resources. <http://developer.apple.com/mac/library/documentation/Cocoa/Conceptual/LoadingResources/ImageSoundResources/ImageSoundResources.html> +Sam On Wed, Jul 14, 2010 at 4:42 PM, Vincenzo Morgante <enzo...@yahoo.it> wrote: > Hi, I'm a newbie and I should use an image and show it, so I should put this > image into the resources directory within my XCode project. How can I load > the file containing this image? I should use this file in order to create an > IplImage object (see OpenCV), but the image is not found. > If I specify the complete path, for example "Users/myName/Desktop/image.png", > the image is loaded without any problems, but if I want to load it from > resources directory, it doesn't work because the image is not found. > > IplImage *image = cvLoadImage("Users/myName/Desktop/image.png", ...); > The above code works because the path is full, I would include the image into > the executable. > > How could I resolve the problem? > > Thanks a lot! > > Vincenzo > > > > > > _______________________________________________ > > Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) > > Please do not post admin requests or moderator comments to the list. > Contact the moderators at cocoa-dev-admins(at)lists.apple.com > > Help/Unsubscribe/Update your Subscription: > http://lists.apple.com/mailman/options/cocoa-dev/sam.reshu%40gmail.com > > This email sent to sam.re...@gmail.com > _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com