Premultiplied colors and alpha=0

Glynn Clements glynn at gclements.plus.com
Wed Aug 13 20:27:36 PDT 2008


Soeren Sandmann wrote:

> Generally to recover the "real" pixel from a premultiplied one, you
> have to divide by the alpha channel, but this leads to a problem when
> the alpha channel is 0. How should a render implementation treat such
> pixels?
> 
> Suppose it is compositing a source pixel with alpha 0 and color
> channels non-zero

How is that supposed to happen?

If the colour channels have been pre-multiplied by the alpha, and the
alpha is zero, the colour channels will also be zero, no?

AIUI, the notion of pre-multiplication implies that none of the colour
channels can have a value which exceeds the alpha value.

-- 
Glynn Clements <glynn at gclements.plus.com>



More information about the xorg mailing list