Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Color Channel Splitting



Incidentally, you can combine the outputs again by piping the Red, Green and Blue images from the CIFilter in my previous post to 3 Billboards, and setting the Blending Mode of each billboard to Add.

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




----- Original Message ----
From: Alex Drinkwater <email@hidden>
To: email@hidden
Sent: Thursday, 8 May, 2008 9:03:31 PM
Subject: Re: Color Channel Splitting

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@hidden>
To: email@hidden
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@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/quartzcomposer-dev/email@hidden

This email sent to email@hidden


Sent from Yahoo! Mail.
A Smarter Email.


Sent from Yahoo! Mail.
A Smarter Email.
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Quartzcomposer-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/quartzcomposer-dev/email@hidden

This email sent to email@hidden



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.