Re: Managing image loading
Re: Managing image loading
- Subject: Re: Managing image loading
- From: Jens Alfke <email@hidden>
- Date: Tue, 04 Feb 2014 11:47:35 -0800
On Feb 4, 2014, at 9:03 AM, Leonardo <email@hidden> wrote:
> - When the user imports a new image, I add its NSData to the NSFileWrapper
> [docFileWrapper addRegularFileWithContents:imgData
> preferredFilename:@"image.png"];
> and retain the NSImage. So I can draw the NSImage at any time.
You don't need an NSFileWrapper for that. I would just use NSFileManager to copy the file, and NSData methods to read/write the file. I have no idea whether NSFileWrapper caches the file contents in memory or not.
—Jens
_______________________________________________
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