<p>In an EXR, the convention is to store <em>associated alpha</em>, also known as <em>premultiplied</em>. The latter term however doesn't do justice to the nuances of the alpha format as compared to its evil distant cousin known as <em>unassociated alpha</em>, aka <em>straight</em> or <em>key</em> alpha.</p>

<p>In an associated alpha image, two facets are represented via the RGB triplet and its associated alpha channel:</p>

<ol>
<li>Occlusion.</li>
<li>Emission.</li>
</ol>

<p>In an associated alpha image, the alpha channel could be considered to represent a distillation of the geometry of occlusion covering a given pixel coordinate. 0.5 would represent a baked down 50% occlusion, while the RGB values would represent the degree of emission.</p>

<p>This also means that an RGBA triplet such as 0.0,12.4,10282.9,0.0 is entirely valid, and represents a pixel that is emitting and unoccluding. Naturally occuring things such as candles represent such a combination. Consider the following image:
<a href="https://i.sstatic.net/aINLh.jpg" rel="noreferrer"><img src="https://i.sstatic.net/aINLh.jpg" alt="Candle flame with no shadow"></a></p>

<p>The above image could not be created using unassociated alpha, and is symptomatic as to why ray tracing renderers cannot generate any alpha model other than associated alpha.</p>

<p>The fundamental difference between the two alpha formats is defined by the two different over operations, as described by <a href="http://ssp.impulsetrain.com/porterduff.html" rel="noreferrer">Porter Duff</a>.</p>

<p>Associated alpha over:</p>

<pre><code>FG.RGB + ((1.0-FG.Alpha) * BG.RGB
</code></pre>

<p>Unassociated alpha over:</p>

<pre><code>(FG.Alpha * FG.RGB) + ((1.0-FG.Alpha) * BG.RGB
</code></pre>

<p>The nuances of the difference mean that care should be taken when dealing with alpha and the RGB channels.</p>

CC BY-SA 3.0
2017-01-15T07:56:33.693Z
Offcourse it is possible to unmult this  apha if one so wishes. Im a bit unsure about whether this answers the question though, incredibly vague as it is.
joojaa
CC BY-SA 3.0
2017-01-15T08:11:15.523Z
@joojaa It isn't quite as straightforward as you have to be certain to preserve unpremult values at RGB 0.0. The only time this is required is on colour operations, otherwise associated alpha is always the correct format.
troy_s
CC BY-SA 3.0
2017-01-15T09:47:06.293Z
Sure, but alpha in images is a problematic concept in many situations anyway.
joojaa
CC BY-SA 3.0
2017-01-15T05:15:45.130Z
2017-01-15T05:15:45.130Z
troy_s
<p>Generally, the "a" channel is referred to as the <a href="https://en.wikipedia.org/wiki/Glossary_of_computer_graphics#Alpha_channel" rel="nofollow noreferrer">alpha channel</a>. It represents the amount of a pixel that an object covers. For computer-generated imagery this is pretty straightforward. </p>

<p>If I generate a circle, parts of the circle on the interior will cover a full pixel, but parts on the edges of the circle may only cover a portion of the pixel. Internal pixels would have an alpha channel of 100%, whereas those edge pixels that only cover a portion of the pixel would have a value less than 100%. Outside the circle all pixels would have an alpha value of 0%.</p>

<p>For captured imagery, generally all pixels have an alpha value of 100%. However, if you use keying or matting tools to remove a green screen or blue screen, for example, there will be some pixels that are partially green (or blue), and they may end up with an alpha value between 0% and 100%. pixels that are solid green (or blue) will have an alpha value of 0%, and pixels that contain no green (or blue) will have an alpha value of 100%.</p>

<p>This is used when you want to composite one image over another. For normal compositing, you will mix the top and bottom pixels by multiplying the color value of the top pixel by its coverage or alpha, multiplying the color value of the bottom pixel by the inverse of the alpha (1.0 - alpha), and adding the two together. So it would look something like this:</p>

<pre><code>composite = top * alpha + bottom * (1.0 - alpha)
</code></pre>

CC BY-SA 3.0
2017-01-15T03:12:52.950Z
2017-01-15T03:20:40.020Z
2017-01-15T03:20:40.020Z
user1118321
<p>Simply put, what does the transparency data of an EXR file represent? </p>

CC BY-SA 3.0
2017-01-14T10:59:07.507Z
Anything you deem necessary
joojaa
<image-processing><image>
Explanation of a the transparency of an .EXR file
Gullie667
# Explanation of a the transparency of an .EXR file

(Asked by: username_0 on 2017-01-14)

Simply put, what does the transparency data of an EXR file represent?

**Tags:** image-processing, image

> **Comments:**
> **username_1**: Anything you deem necessary  

---

## 2 answers

### Answer by username_2 on 2017-01-15. Score: 5

In an EXR, the convention is to store *associated alpha*, also known as *premultiplied*. The latter term however doesn't do justice to the nuances of the alpha format as compared to its evil distant cousin known as *unassociated alpha*, aka *straight* or *key* alpha.

In an associated alpha image, two facets are represented via the RGB triplet and its associated alpha channel:

1. Occlusion.
2. Emission.

In an associated alpha image, the alpha channel could be considered to represent a distillation of the geometry of occlusion covering a given pixel coordinate. 0.5 would represent a baked down 50% occlusion, while the RGB values would represent the degree of emission.

This also means that an RGBA triplet such as 0.0,12.4,10282.9,0.0 is entirely valid, and represents a pixel that is emitting and unoccluding. Naturally occuring things such as candles represent such a combination. Consider the following image:
[![Candle flame with no shadow](https://i.sstatic.net/aINLh.jpg)](https://i.sstatic.net/aINLh.jpg)

The above image could not be created using unassociated alpha, and is symptomatic as to why ray tracing renderers cannot generate any alpha model other than associated alpha.

The fundamental difference between the two alpha formats is defined by the two different over operations, as described by [Porter Duff](http://ssp.impulsetrain.com/porterduff.html).

Associated alpha over:

```
FG.RGB + ((1.0-FG.Alpha) * BG.RGB

```

Unassociated alpha over:

```
(FG.Alpha * FG.RGB) + ((1.0-FG.Alpha) * BG.RGB

```

The nuances of the difference mean that care should be taken when dealing with alpha and the RGB channels.

> **Comments:**
> **username_1**: Offcourse it is possible to unmult this  apha if one so wishes. Im a bit unsure about whether this answers the question though, incredibly vague as it is.  
> **username_2**: @username_1 It isn't quite as straightforward as you have to be certain to preserve unpremult values at RGB 0.0. The only time this is required is on colour operations, otherwise associated alpha is always the correct format.  
> **username_1**: Sure, but alpha in images is a problematic concept in many situations anyway.  

---

### Answer by username_3 on 2017-01-15. Score: 0

Generally, the "a" channel is referred to as the [alpha channel](https://en.wikipedia.org/wiki/Glossary_of_computer_graphics#Alpha_channel). It represents the amount of a pixel that an object covers. For computer-generated imagery this is pretty straightforward.

If I generate a circle, parts of the circle on the interior will cover a full pixel, but parts on the edges of the circle may only cover a portion of the pixel. Internal pixels would have an alpha channel of 100%, whereas those edge pixels that only cover a portion of the pixel would have a value less than 100%. Outside the circle all pixels would have an alpha value of 0%.

For captured imagery, generally all pixels have an alpha value of 100%. However, if you use keying or matting tools to remove a green screen or blue screen, for example, there will be some pixels that are partially green (or blue), and they may end up with an alpha value between 0% and 100%. pixels that are solid green (or blue) will have an alpha value of 0%, and pixels that contain no green (or blue) will have an alpha value of 100%.

This is used when you want to composite one image over another. For normal compositing, you will mix the top and bottom pixels by multiplying the color value of the top pixel by its coverage or alpha, multiplying the color value of the bottom pixel by the inverse of the alpha (1.0 - alpha), and adding the two together. So it would look something like this:

```
composite = top * alpha + bottom * (1.0 - alpha)

```


---

