NSImage to JPEG file?
NSImage to JPEG file?
- Subject: NSImage to JPEG file?
- From: Greg Weston <email@hidden>
- Date: Wed, 16 Jan 2019 15:12:14 -0500
>> 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.
>
> But all of that would come "for free" if NSImage inherited from NSData, no?
No. Because there’s no guarantee that the “data” that define an NSImage - or
its representation(s) - conform to any specific commodity format.
_______________________________________________
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