• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Adding an image to a project
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Adding an image to a project


  • Subject: Re: Adding an image to a project
  • From: Sam <email@hidden>
  • Date: Wed, 14 Jul 2010 17:10:01 +0530

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 <email@hidden> 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 (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
>
_______________________________________________

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

References: 
 >Adding an image to a project (From: Vincenzo Morgante <email@hidden>)

  • Prev by Date: Re: Adding an image to a project
  • Next by Date: Re: Adding an image to a project
  • Previous by thread: Re: Adding an image to a project
  • Next by thread: Re: Adding an image to a project
  • Index(es):
    • Date
    • Thread