Re: Problem with converting an NSImage to grayscale
Re: Problem with converting an NSImage to grayscale
- Subject: Re: Problem with converting an NSImage to grayscale
- From: Ricky Sharp <email@hidden>
- Date: Tue, 30 Aug 2005 20:23:59 -0500
On Aug 30, 2005, at 9:31 AM, John C. Randolph wrote:
The Image Difference sample is correct, for versions of OS X prior
to Tiger. The point I was making is that it's no longer necessary
to do this at all, since CoreImage has a filter that does the RGB
to grayscale mapping according to the NTSC formula.
I currently employ code from that sample in my kiosk-type app.
Whenever I need to display a dialog, I do a capture of the contents
of my main window, convert to grayscale, and use the result as the
background of the dialog. Here, dialog isn't a separate window; it's
simply another layer of widgets in my one main window.
Anyhow, when at the Tiger Tech Talk back in November, I had asked if
it would be a benefit for me to replace the code with CoreImage.
Forgot who was presenting at that particular session, but he told me
that there would be too much overhead involved and it would be faster
to just do the direct pixel access stuff. I agree that needs may
vary especially if you'll be doing this conversion often. In my
case, it's user-driven and doesn't occur often.
___________________________________________________________
Ricky A. Sharp mailto:email@hidden
Instant Interactive(tm) http://www.instantinteractive.com
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden