# Talk:Alpha compositing

WikiProject Graphic design
This article is within the scope of WikiProject Graphic design, a collaborative effort to improve the coverage of graphic design-related subjects on Wikipedia. If you would like to participate, please visit the project page, where you can join the discussion and see a list of open tasks.
WikiProject Technology
This article is within the scope of WikiProject Technology, a collaborative effort to improve the coverage of technology on Wikipedia. If you would like to participate, please visit the project page, where you can join the discussion and see a list of open tasks.

## Why alpha?

In the German wp a user asked why the alpha channel was called alpha channel. Does anybody has got an idea? --PhilippWeissenbacher 17:51, May 14, 2005 (UTC)

My guess: RGBA color space Mion 16:28, 21 January 2006 (UTC)

I found a reference and added the information to RGBA color space. --130.234.180.167 23:02, 3 July 2006 (UTC)

## Merger

Merge what with which? William Jockusch (talk) 15:44, 4 October 2012 (UTC)

### For

• Merge it. They're the same thing. Ayavaron 21:12, 10 September 2006 (UTC)
• Merge it. The information in blending is basically the A Over B formula when B is opaque. Alancnet 10:26, 14 September 2006 (UTC)
• Merge it. Neither article tells the whole story now. I do, however, think [Alpha Blending] is the better title -- many other uses of "composite" are applied to reversable or decomposable preocesses. I think of blending as producing an inseparable product. Rndmcnlly 23:42, 15 September 2006 (UTC)
• Merge. In particular, the alpha blending article raises the important point that a single alpha channel is not the only option for this technique. The compositing article should mention this, and discuss the limitations of conventional RGBA compositing, such as inaccuracy in depictions of transparency in composites, especially with refractive or colored transparent elements.

## Required Details

• a separate article, Coverage (Computer Science), talking about representation of partially transparent images
• a photorealistic example (showing the result of combining at least 3 layers (A over (B over C)))
• refocus article on the general case of blending pixels, both with arbitrary coverage
• clarification between discussion of blending whole images and the blending of two specific pixels
• discussion of different formulations of the compositing operators (mention whether they are associative or not)
• a small table of all possible operations (T. Porter and T. Duff, "Compositing Digital Images", SIGGRAPH 84, 253-259)
• a Separate section about implementation that discusses using associativity to allow distribution/parallelization, 0-1-only alpha bitmaps, integer-only representations, lookup table usage, setting up glBlendFunc

-- Rndmcnlly 01:00, 16 September 2006 (UTC)

## Errors

>Image editing applications that allow reordering of layers generally prefer this second approach.

No, Image editing applications that allow reordering of layers generally don't use premultiplied color. —Preceding unsigned comment added by 192.150.10.200 (talk) 03:22, 23 February 2011 (UTC)

> it is common to also multiply the color by the alpha value, to save on additional multiplications during compositing.

Incorrect because the compositing operator can be reduced to a single multiply anyway. T*a + B*(1-a) === B + (T-B)*a —Preceding unsigned comment added by 192.150.10.200 (talk) 03:28, 23 February 2011 (UTC)

>Premultiplied alpha also has some advantages over normal alpha blending because premultiplied alpha blending is associative and linear interpolation gives better results.

This does not seem to have a reference, and is not supported by the rest of the article. —Preceding unsigned comment added by 192.150.10.200 (talk) 03:35, 23 February 2011 (UTC)

## Possible error

According to Porter & Duff, the over operator solves to cO = cA*1+cB*(1-aA), which is equivalent to CO = (CA*aA+CB*aB*(1-aA))/aO, which is the second formula mentioned, not the first. The first formula, B' = F*a + B*(1-a), was mentioned in passing as being similar to the over function, but not equal. 64.229.30.184 05:54, 23 May 2007 (UTC)

sep

Hmm. I'm another reader, who finds the first equation in flat contradiction of the others (the later "premultiplied" rule and the "associative" rule seem to be equivalent, but the first equation looks just plain wrong). Also it's not made clear the relation between the "over" operation in the first section and the "Alpha Blending" section below. 212.44.20.129 (talk) 11:26, 20 May 2008 (UTC)

There is an error on the second formula, is Ao (alpha zero) instead Aa (alpha a). —Preceding unsigned comment added by 80.205.86.211 (talk) 11:22, 9 October 2008 (UTC)

French Wikipedia page has a bit different and maybe more applicaple equations. It should be considered changing this page closer to the French page since the equations on French page http://fr.wikipedia.org/wiki/Alpha_blending handle output alpha channel a bit more consistently. It should be mentioned that C_o = C_a \alpha_a + C_b \alpha_b \left(1 - \alpha_a\right) needs to be devided by output alpha for correct RGB pixel values. This is presented clearly in French Wikipedia equations. — Preceding unsigned comment added by 91.155.87.158 (talk) 06:23, 26 September 2011 (UTC)

I agree with the above complaints and I fixed this to match the French page. This entry shouldn't have had a blatant mathematical contradiction between the definition of c_O and C_O for seven years. — Preceding unsigned comment added by 166.175.57.129 (talk) 23:08, 11 July 2015 (UTC)

## Confusion

RGB triple should instead be RGBA 4-tuple?

I find this line to be confusing: "Thus, assuming that the pixel color is expressed using RGB triples, a pixel value of (0.0, 0.5, 0.0, 0.5) implies a pixel which is fully green and has 50% coverage."

Seems like it should be (0.0, 1.0, 0.0, 0.5) and called a RGBA 4-tuple. I'm afraid to change it, because maybe I just don't get it!

24.106.89.6 12:43, 5 September 2007 (UTC)

I've added this: (Explanation: The RGB values are the first three values, (0, 0.5, 0) and the alpha value is the fourth, 0.5. If the color were fully green, its RGB would be (0, 1, 0). Since this pixel is using a premultiplied alpha, all of the RGB values in the ordered triplet (0, 1, 0) are multiplied by 0.5 and then the alpha is added to the end to yield (0, 0.5, 0, 0.5). ) --Rajah (talk) 15:45, 5 May 2008 (UTC)

This explanation is not much help because two of the three colour values are zero. What would the premultipled alpha be if the RGB values were, for example, (0.3, 0.4, 0.5)? —Preceding unsigned comment added by 193.72.68.35 (talk) 13:28, 13 May 2010 (UTC)

## Intro / Abstract

The introduction goes into too much detail in the second paragraph. The introduction should offer more real life examples before explaining the technology, and mention why this is important and worthy of inclusion. I'm learning about this as a newbie and the tech crap is sort of mind boggling in minutiae with no real overview of what this is and why it's useful and what distinguishes it from other, similar concepts. JazzyGroove 15:32, 15 September 2009 (PST).

Agreed, the intro paragraphs are both vague and over-detailed. E.G.:
It is often useful to render image elements in separate passes, and then combine the resulting multiple 2D images into a single, final image in a process called compositing. For example, compositing is used extensively when combining computer rendered image elements with live footage.
We're told the technique is useful, but not why it's useful, especially relative to other techniques. Useful in what way? What's gained? What's lost? Then an example is given, but no reason is given for the example. --AC (talk) 03:05, 10 April 2012 (UTC)

___________________________

I Agree, I also came here to figure out how to use transparency in an icon I need to make. I was hoping to find a simple answer that would tell me how to do it, instead I find something more suited to digital graphic engineering. Every graphic program I have used has a very hard time explaining transparency and how to do it in simple terms so someone can do it and get on with the creation they are working on without all the background technology. What ever the description is it should include non-web page methods. 98.216.193.104 (talk) 18:14, 24 December 2013 (UTC)

## New example image?

I think the example image is useless, as it doesn't demonstrate what alpha really is, it looks just like hue + saturation (because it's alpha blended on white). What you need is some real world images alpha-blended together. Like maybe a landscape and a dragonfly with semi-transparent wings. 82.139.87.148 (talk) 05:44, 1 October 2009 (UTC)

## Moved list of Operating Systems

There was a list of Operating Systems which support alpha compositing stuffed into the section defining it mathematically. I felt that this wasn't the right place to put this information, so I added an "Applications" section and added a little bit of additional information. It could stand to be reviewed and fleshed out, perhaps with some sort of notes about what exactly each of the OS's support blending. (widgets in a window but not the windows themselves? transparent windows but only opaque widgets? completely arbitrary arrangements of transparent windows and widgets?)

I don't know how important the list is, but somebody obviously went to some trouble to make it, so I am hesitant to just toss it. I also added a link to Compositing software which seems like it should be somewhere in the article, even if that section is removed. —Preceding unsigned comment added by 76.169.41.151 (talk) 04:14, 19 September 2010 (UTC)

## Added new section on analytic derivation of the over operator

The new section describes how to derive the over operator analytically. It is different from the approach outlined by Bruce Wallace (which is much more convoluted IMO.) I know also a second approach on how to derive the operator, which is similar to the one by Bruce, but it relies on using Bayesian probability.

Any feedback is welcome. I also agree that the section called "alpha blending" needs to be merged with the first section. Meanderix (talk) 20:07, 20 November 2010 (UTC)

I believe the formula can be compacted further: Co=(Aa/Ao)(Ca-Cb)+Cb 68.81.139.28 (talk) 03:38, 1 February 2012 (UTC)

## Over algorithm section is confusing

I am a computer programmer who is new to compositing. I came here to learn how to do it. I found the section on the over operator to be incredibly confusing. In particular, the initial mentioned formula

${\displaystyle C_{o}=C_{a}\alpha _{a}+C_{b}\alpha _{b}\left(1-\alpha _{a}\right)}$

appears to have the property that if you take a layer and put a transparent layer behind a partially transparent image, the composited image differs from the original image! That can't possibly be right. I see that if you then use the version where you divide by the new alpha value, this problem does not occur. However, the article would have made much more sense to me if the original formula had not beent here at all. It would make more sense to start with the sane version. Crazy variants should be left out entirely, so that a reader who is trying to learn the subject does not waste mental cycles on them. William Jockusch (talk) 15:43, 4 October 2012 (UTC)

## Applications

Are there any valid reasons for having the Applications section? It seems nowadays there are too many Applications too list and almost every modern OS supports alpha-blending. — Preceding unsigned comment added by 24.4.33.160 (talk) 01:33, 11 November 2012 (UTC)

I also don't see the importance of having a list of Applications that support alpha-blending. Furthermore, it is incomplete. Since there hasn't been any objections since 2012, I'll go ahead and remove it. — Preceding unsigned comment added by 216.38.147.4 (talk) 17:55, 8 July 2015 (UTC)

## Assessment comment

The comment(s) below were originally left at Talk:Alpha compositing/Comments, and are posted here for posterity. Following several discussions in past years, these subpages are now deprecated. The comments may be irrelevant or outdated; if so, please feel free to remove this section.

 merge to alpha compositing

Substituted at 17:58, 5 June 2016 (UTC)