Re: NSImage to JPEG file?
Re: NSImage to JPEG file?
- Subject: Re: NSImage to JPEG file?
- From: Jens Alfke <email@hidden>
- Date: Wed, 16 Jan 2019 09:43:38 -0800
> On Jan 16, 2019, at 8:32 AM, Carl Hoefs <email@hidden>
> wrote:
>
> It was the NSData tie-in I didn't know. (I was expecting NSImage to have
> innate export capabilities
That would be poor API design. If it had -writeToFile, then it would also need
-writeToStream:, -writeToFileHandle:, -writeToFileDescriptor:,
-writeToNSURLSessionDataDelegate:, etc.
Providing the data itself means you can then use existing APIs on other classes
to put the data anywhere you want.
—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