Re: Premultiplied colors and alpha=0 | |
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] | |
Keith Packard <keithp@xxxxxxxxxx> writes:
> On Wed, 2008-08-13 at 21:46 +0200, 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?
>
> Premultiplied *is* the real color; non-premultiplied is a poser.
>
> The Over operator does
>
> dst = dst * (1-srcA) + src
>
> That works for any srcA value, even zero. Pixels where any color channel
> is greater than alpha are called 'super luminescent' colors.
That's fine when alpha > 0 -- there is a visual interpretation to such
pixels: they emit light. But for alpha=0, I don't see any visual
interpretation. Do they emit "infinite" amounts of light?
Another way of asking the question is: Suppose you want to convert a
premultiplied pixel from sRGB to linear light. If alpha is interpreted
linearly, then you would have to do something like this for each color
channel:
C' = alpha * (C / alpha) ** 2.2
What do you do if alpha is 0? Or do we not interprete alpha linearly?
Soren
_______________________________________________
xorg mailing list
xorg@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/xorg
[X Forum] [Devices] [XFree86] [XFree86 Newbie] [Site Home] [IETF Annouce] [Security] [Fontconfig] [Bugtraq] [Rubini] [Photo] [Yosemite] [MIPS Linux] [ARM Linux] [Linux Security] [Video for Linux] [Linux RAID] [Linux Resources]