Re: NSImage with alpha channel of other NSImage
Re: NSImage with alpha channel of other NSImage
- Subject: Re: NSImage with alpha channel of other NSImage
- From: Ricky Sharp <email@hidden>
- Date: Sat, 16 Sep 2006 13:39:24 -0500
On Sep 16, 2006, at 10:33 AM, Alexander Cohen wrote:
How can i get an NSImage of only the alpha channel of another NSImage?
I'll assume that the original NSImage will have an NSBitmapImageRep.
Having said that, you could create a new NSBitmapImageRep and use
direct pixel access on the original rep, and copy over the alpha
value in triplicate to the new rep's RGB comps.
The following sample shows how to do direct pixel access:
<http://developer.apple.com/samplecode/Monochrome_Image/index.html>
Specifically, look at NSImage_monochrome.m. It would be easy to
modify this category to suit your needs.
___________________________________________________________
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