Re: Compositing math in SVG

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 UTC