Re: Converting NSImage with multiple image representations (HiDPI+LowDPI) into grayscale NSImage
Re: Converting NSImage with multiple image representations (HiDPI+LowDPI) into grayscale NSImage
- Subject: Re: Converting NSImage with multiple image representations (HiDPI+LowDPI) into grayscale NSImage
- From: Kyle Sluder <email@hidden>
- Date: Thu, 13 Sep 2012 00:41:49 -0700
On Sep 10, 2012, at 12:31 AM, Abhijit Apte <email@hidden> wrote:
> I can pick out NSImageRep objects of NSImage and then use [NSImageRep
> CGImageForProposedRect:context:hints:] method to extract CGImageRef. I can
> do grayscale conversion on each of these CGImageRefs, however I cannot put
> these back into a single NSImage.
Why not? Use -[NSBitmapImageRep initWithCGImage:] and -[NSImage addRepresentation:].
--Kyle Sluder
_______________________________________________
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