Content-Type: multipart/alternative; boundary=bcaec54ee94a32e14104cdc45c92 --bcaec54ee94a32e14104cdc45c92 Content-Type: text/plain; charset=ISO-8859-1 Hi, Some days ago, Jasper van de Gronde asked me if I still got problem with negative values in feComposite. He pointed that I forgot about the alpha value (becoming zero) https://bugs.launchpad.net/inkscape/+bug/1044989 So I reworked my filters using his clever trick so that alpha won't reach 0 (except I used feColorMatrix instead of feComponentTransfer) And once again I'm stuck. I try to redo the exclusion filter in photoshop using feComposite For two layers A (=sourceImage) and B (=backgroundImage) with opacities = 1, formula is supposed to be A+B - 2AB. As feComposite (stupidly IMO) computes not only rgb channels but the alpha too I need to get rid of the alpha channel (either in earlier or later stages) until now I failed. What I'd expected rgb(1,0,0.5, x) exclusion rgb(0,1,0.5, y) should be rgb(1,1,0.5, 1) r:1 + 0 - 2 (1*0) = 1 g:0 + 1 - 2 (0*1) = 1 b:0.5+0.5 - 2 (0.5*0.5) = 0.5 problem is the alpha coz 1 + 1 - 2(1*1) = 0 I tried the 2 following solutions solution 1: dealing later with alpha => set alpha to 1 when everything is done. feComposite k=(-2;1;1;_) followed by colorMatrix 1 0 0 0 0 0 1 0 0 0 <= identity for rgb 0 0 1 0 0 0 0 0 0 1 <= reset alpha to 1.0 whatever it could've been before this doesn't work, the result is full black solution 2: dealing earlier with alpha => set alpha so that it is 1 and not 0 after composition (=set it to 0 before the feComposite) pass sourceimage through the following colormatrix to remove the alpha 1 0 0 0 0 0 1 0 0 0 <= identity for rgb 0 0 1 0 0 0 0 0 0 0 <= reset alpha to 0 run this + backgrounImage in feComposite k=(-2;1;1;_) with this I'd expected the alpha to be ok because 0 + 1 - 2 (1*0) = 1. but this doesn't work either (fully transparent ?) Could anybody help ? How do you deal with alpha when using feComposite ? Does Inkscape (or svg) drop result of a filter stage if alpha is zero ? (in solution 1) --bcaec54ee94a32e14104cdc45c92 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hi,

Some days ago, Jasper van de Gronde asked me if I still got prob= lem with negative values in feComposite.
He pointed that I forgot about = the alpha value (becoming zero) https://bugs.launchpad.net/inkscape/+bug/1044989

So I reworked my filters using his clever trick so that alpha won't= reach 0 (except I used feColorMatrix instead of feComponentTransfer)
And once again I'm stuck.
I try to redo the exclusion filter in ph= otoshop using feComposite
For two layers A (=3DsourceImage) and B (=3DbackgroundImage) with opacities= =3D 1, formula is supposed to be A+B - 2AB.

As feComposite (stupidl= y IMO) computes not only rgb channels but the alpha too I need to get rid o= f the alpha channel (either in earlier or later stages) until now I failed.=

What I'd expected
rgb(1,0,0.5,=A0 x) exclusion rgb(0,1,0.5,=A0 y= ) should be rgb(1,1,0.5, 1)
r:1 + 0 - 2 (1*0) =3D 1
g:0 + 1 - 2 (0*1)= =3D 1
b:0.5+0.5 - 2 (0.5*0.5) =3D 0.5

problem is the alpha coz1 + 1 - 2(1*1) =3D 0

I tried the 2 following solutions

solution 1: dealing later with= alpha =3D> set alpha to 1 when everything is done.
feComposite k=3D(= -2;1;1;_)
followed by colorMatrix
1 0 0 0 0
0 1 0 0 0 <=3D iden= tity for rgb
0 0 1 0 0
0 0 0 0 1 <=3D reset alpha to 1.0 whatever it could've = been before

this doesn't work, the result is full black

<= br>solution 2: dealing earlier with alpha =3D> set alpha so that it is 1= and not 0 after composition (=3Dset it to 0 before the feComposite)
pass sourceimage through the following colormatrix to remove the alpha
1= 0 0 0 0
0 1 0 0 0 <=3D identity for rgb
0 0 1 0 0
0 0 0 0 0 &l= t;=3D reset alpha to 0
run this + backgrounImage in feComposite k=3D(-2;= 1;1;_)

with this I'd expected the alpha to be ok because
0 + 1 - 2 (1*0= ) =3D 1.

but this doesn't work either (fully transparent ?)
<= br>Could anybody help ?
How do you deal with alpha when using feComposit= e ?=A0
Does Inkscape (or svg) drop result of a filter stage if alpha is zero ? (in= solution 1)

--bcaec54ee94a32e14104cdc45c92--