W3C home > Mailing lists > Public > www-svg@w3.org > July 2012

Re: Compositing math in SVG

From: Rik Cabanier <cabanier@gmail.com>
Date: Sat, 21 Jul 2012 19:19:24 -0700
Message-ID: <CAGN7qDBK1re425xrimKHT1HTV0jhseVae-D0vRNvn9qaEfYFNg@mail.gmail.com>
To: Calculemus <calculemus1988@gmail.com>
Cc: steve@fenestra.com, www-svg@w3.org
Let's say you have red at 50% alpha. Premultiplied that becomes (.5, 0, 0,
.5) but this is not what you send to the display since it can't display
alpha.
So, what you do is matte (=composite) with white to get rid of the alpha:
 (.5, 0, 0) + (1-.5)*(1,1,1) = (1, .5, .5)

On Sat, Jul 21, 2012 at 4:59 PM, Calculemus <calculemus1988@gmail.com>wrote:

> Yes we are using pre-multiplied values so I don't need to
> divide the result with alpha. But yes I also calculate the result
> alpha as: aa + ba(1-aa)
>
> Hmm, what exactly do you mean by "matte with white"?
>
> Thanks
>
>
>
>
Received on Sunday, 22 July 2012 02:19:52 GMT

This archive was generated by hypermail 2.3.1 : Friday, 8 March 2013 15:54:51 GMT