Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Special pages
Niidae Wiki
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Alpha compositing
(section)
Page
Discussion
English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Page information
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==Description== In a 2D image a color combination is stored for each picture element (pixel), often a combination of red, green and blue ([[RGB color model|RGB]]). When alpha compositing is in use, each pixel has an additional numeric value stored in its '''alpha channel''', with a value ranging from 0 to 1. A value of 0 means that the pixel is fully [[transparency and translucency|transparent]] and the color in the pixel beneath will show through. A value of 1 means that the pixel is fully opaque. With the existence of an alpha channel, it is possible to express compositing image operations using a ''compositing algebra''. For example, given two images ''A'' and ''B'', the most common compositing operation is to combine the images so that ''A'' appears in the foreground and ''B'' appears in the background. This can be expressed as ''A'' '''over''' ''B''. In addition to '''over''', Porter and Duff<ref name=Duff/> defined the compositing operators '''in''', '''held out by''' (the phrase refers to [[Matte (filmmaking)#Garbage and holdout mattes|holdout matting]] and is usually abbreviated '''out'''), '''atop''', and '''xor''' (and the reverse operators '''rover''', '''rin''', '''rout''', and '''ratop''') from a consideration of choices in blending the colors of two pixels when their coverage is, conceptually, overlaid orthogonally: [[Image:Alpha compositing.svg]] As an example, the '''over''' operator can be accomplished by applying the following formula to each pixel:<ref name=Wallace/> :<math>\begin{align}\alpha_o &= \phantom{~C_a}\alpha_a + \phantom{C_b}\alpha_b(1 - \alpha_a) \\ C_o &= \frac{ C_a \alpha_a + C_b \alpha_b (1 - \alpha_a) }{\alpha_o} \end{align}</math> Here <math>C_o</math>, <math>C_a</math> and <math>C_b</math> stand for the color components of the pixels in the result of the "over", image A, and image B respectively, applied to each color channel (red/green/blue) individually, whereas <math>\alpha_o</math>, <math>\alpha_a</math> and <math>\alpha_b</math> are the alpha values of the respective pixels. The '''over''' operator is, in effect, the normal painting operation (see [[Painter's algorithm]]). The '''in''' and '''out''' operators are the alpha compositing equivalent of [[Clipping path|clipping]]. The two use only the alpha channel of the second image and ignore the color components. In addition, '''plus''' defines additive blending.<ref name=Duff/>
Summary:
Please note that all contributions to Niidae Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Encyclopedia:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Search
Search
Editing
Alpha compositing
(section)
Add topic