LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   Alpha equation (https://www.linuxquestions.org/questions/programming-9/alpha-equation-794587/)

Kenny_Strawn 03-10-2010 10:01 PM

Alpha equation
 
Quoted from the Wikipedia article on Alpha compositing:

Quote:

As an example, the over operator can be accomplished by applying the following formula to each pixel value:

C_o = C_a \alpha_a + C_b \alpha_b \left(1 - \alpha_a\right)

where Co is the result of the operation, Ca is the color of the pixel in element A, Cb is the color of the pixel in element B, and αa and αb are the alpha of the pixels in elements A and B respectively.
The rest of the article can be seen here.

Now the ultimate question: How can this be implemented with 3 values instead of 2?

Kenny_Strawn 03-10-2010 10:59 PM

Sorry, I figured this out myself.


All times are GMT -5. The time now is 02:38 AM.