The way I do this was to use a simple mask channel mask. Make a CIFilter that lets you multiply the incoming frame by a vec4, and set its components to 0 or 1 values, so if you only wanted the red channel, you would multiply your image by vec4(1.0, 0.0, 0.0, 1.0) (the last value is for alpha, depending on how you want to handle it, you may want to premultiply or whatnot).

You then do this 3 times for each channel, and then, simply use another simple CIKernel to add each component together from your 3 source images by doing something like

vec4 result = vec4(red.r, green.g, blue.b, red.a) (this keeps the red alpha channel, but you can deal with it however you want).

Id be curious if there is a better way, but that works.

Attachment: Color Mask.qtz
Description: application/quartzcomposer


On May 8, 2008, at 2:38 PM, neb wrote:

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/doktorp%40mac.com

This email sent to [EMAIL PROTECTED]

 _______________________________________________
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