• 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
Cant figure out images
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Cant figure out images


  • Subject: Cant figure out images
  • From: Etienne Gignac Bouchard <email@hidden>
  • Date: Tue, 10 Mar 2009 20:45:59 -0400
  • Thread-topic: Cant figure out images

Hi guys.

So I tried NSImage without much success and now I¹m trying CIImage.  I have
the following code:

NSURL *testUrl;

    testUrl = [NSURL URLWithString:@"/Users/Etienne/Desktop/logo.gif"];
    CIImage *imageTest;


    if(testUrl == nil)
        NSLog(@"TEST NIL !");
    else
        NSLog(@"TEST : %@", testUrl); // PRINT THE URL

    imageTest = [[NSImage alloc] initWithContentsOfURL:testUrl];

    if(imageTest == nil)
        NSLog(@"Init image with URL failed"); // <---------- I GET THAT
    else
        NSLog(@"image init ok\n");

So my image is always nil...this seems like pretty simple code to me.  What
am I missing.  Oh yeah and the file really is on my desktop...

Thank for your help !

Etienne
_______________________________________________

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

  • Follow-Ups:
    • Re: Cant figure out images
      • From: Nick Zitzmann <email@hidden>
  • Prev by Date: Examples or Documentation for Non-document-based Multi-window App
  • Next by Date: EXC_BAD_ACCESS on NSImageView::setImage
  • Previous by thread: Re: Examples or Documentation for Non-document-based Multi-window App
  • Next by thread: Re: Cant figure out images
  • Index(es):
    • Date
    • Thread