This code in a CIFilter will let you selectively enable/disable Red, Green and 
Blue channels.
Use Boolean splitters attached to the Red Green and Blue inputs. The cables 
will be orange, but it will still work fine.


/*
Enables/disables RGB channels
*/

kernel vec4 selectChannels(sampler Image, float Red, float Green, float Blue)
{
// Sample input pixels
vec4 pix = sample(Image, samplerCoord(Image));
// Enable or enable channels
pix.r = (Red == 1.0) ? pix.r : 0.0;
pix.g = (Green == 1.0) ? pix.g : 0.0;
pix.b = (Blue == 1.0) ? pix.b : 0.0;
// Output

return pix;
}


Hope this helps,

a|x
http://machinesdontcare.wordpress.com




----- Original Message ----
From: neb <[EMAIL PROTECTED]>
To: [email protected]
Sent: Thursday, 8 May, 2008 7:38:39 PM
Subject: Color Channel Splitting

A simple problem, I know the answer is right in front of me but can't 
seem to find it...

How would I go about splitting a single image feed into RGBA or HSBA 
component channels, so that I can process each channel individually as 
images, and then reassemble (or not) later on in the chain? I'm using 
QC3 on leopard.


Thanks!

- Neb
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Quartzcomposer-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/quartzcomposer-dev/the_voder%40yahoo.co.uk

This email sent to [EMAIL PROTECTED]



      __________________________________________________________
Sent from Yahoo! Mail.
A Smarter Email http://uk.docs.yahoo.com/nowyoucan.html
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Quartzcomposer-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/quartzcomposer-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to