Adding an image to a project
Adding an image to a project
- Subject: Adding an image to a project
- From: Vincenzo Morgante <email@hidden>
- Date: Wed, 14 Jul 2010 11:12:10 +0000 (GMT)
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 (email@hidden)
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:
This email sent to email@hidden