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

Re: Compositing math in SVG

From: Rik Cabanier <cabanier@gmail.com>
Date: Fri, 27 Jul 2012 16:50:38 -0700
Message-ID: <CAGN7qDD1gxT4kmrr1zN7Xr89wTfgYB1yKBV2JQSS8aYg7H+3BQ@mail.gmail.com>
To: Calculemus <calculemus1988@gmail.com>
Cc: Dirk Schulze <dschulze@adobe.com>, "steve@fenestra.com" <steve@fenestra.com>, "www-svg@w3.org" <www-svg@w3.org>
On Fri, Jul 27, 2012 at 4:44 PM, Calculemus <calculemus1988@gmail.com>wrote:

> Rik,
>
> 1. "Where is the alpha coming from? Is it already in the image that you're
> applying blending to?"
>
> I created the images A and B in Photoshop, A has opacity
> 75% and B has 100%, so the alpha is coming
> from the images yes.
>
> 2. "If so, you need to alpha blend with the background first and then
> blend."
>
> You mean alpha blend the top image A with bottom/background image B?
> And then blend with...? I am confused, so I am not supposed to use that
> formula?
>

It's still the same formula, but you have to apply it twice because your
alpha is coming from the image pixels.
-> this is what you are doing:

<img>
<g alpha=.75 blend=multiply>

<img>

</g>

-> this is what photoshop is doing

<img>
<g blend=multiply>

<img alpha=.75 >

</g>
Received on Friday, 27 July 2012 23:51:11 GMT

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