• 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: saving images
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: saving images


  • Subject: Re: saving images
  • From: Conrad Shultz <email@hidden>
  • Date: Sat, 21 Jul 2012 09:58:31 -0700

NSImage is for OS X. You need to use UIImage on iOS. One difference is that UIImage doesn't have an -initWithContentsOfURL: method.

Note that UIImage conforms to NSCoding, so once you've loaded a UIImage through whichever means you prefer (NSData, the URL loading system, etc.) you can archive the image to an NSData (and of course unarchive) in the usual manner.

(Sent from my iPhone.)

--
Conrad Shultz

On Jul 21, 2012, at 9:03, "H. Miersch" <email@hidden> wrote:

> hi.
>
> i just started a new ios project where i want to download images using NSimage's initwithcontentsofURL: method.
> now i also want to write those images to permanent storage, but how do i do that? as far as i can tell, NSImage has no method for writing images to disk. is there something i missed? should i download them into an NSData object and save that? but if i do that, will initwithcontentsoffile: read them properly? questions, questions, questions...
>
> any help will be appreciated. thanks.
> _______________________________________________
>
> 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

  • Follow-Ups:
    • Re: saving images
      • From: Graham Cox <email@hidden>
References: 
 >saving images (From: "H. Miersch" <email@hidden>)

  • Prev by Date: Fwd: Cell in Selected NSTableView Not Redrawn
  • Next by Date: Re: saving images
  • Previous by thread: Re: saving images
  • Next by thread: Re: saving images
  • Index(es):
    • Date
    • Thread