• 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: Nick Zitzmann <email@hidden>
  • Date: Sat, 21 Jul 2012 11:18:29 -0600

On Jul 21, 2012, at 10:41 AM, H. Miersch wrote:

>
> On 21. Jul 2012, at 17:37, Nick Zitzmann wrote:
>
>>
>> On Jul 21, 2012, at 10:03 AM, H. Miersch wrote:
>>
>>> 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?
>>
>> You could always download the data given the URL using NSData, and use the NSData to initialize the image. Then you can just save the NSData to storage.
>
> thought so. and when i load it again, i'd have to load it into an NSData object and create the image from that, correct?


Well, once it's on disk, you can use -[NSImage initWithContentsOfURL:] with the file URL and you won't have to make an NSData object if you want to skip that step.

Nick Zitzmann
<http://www.chronosnet.com/>


_______________________________________________

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: 
 >saving images (From: "H. Miersch" <email@hidden>)
 >Re: saving images (From: Nick Zitzmann <email@hidden>)
 >Re: saving images (From: "H. Miersch" <email@hidden>)

  • Prev by Date: Re: saving images
  • Next by Date: Re: 10.7 Full-Screen transition animation corrupts my UI - how to avoid?
  • Previous by thread: Re: saving images
  • Next by thread: Re: saving images
  • Index(es):
    • Date
    • Thread