Erik Dahlström wrote:
...
Here's what Opera 10 does wrt to @bias (it is applied):
- After applying the @kernelMatrix and @divisor the number in @bias will be added to each
channel
- If @preserveAlpha is "true" then the alphachannel will not get any bias
added.
That's strange, I've attached inkscape's output when I change it to do
that (which mostly seems to agree with what I computed manually).
It's agreed that this is probably not what one wants. Considering
that @bias is probably not that widely used at the moment we should try to make it clear
in the spec and to make the bias useful.
How about changing the spec to say something like the following for the application of
@bias:
[[
To apply bias on a pixel follow these steps:
1. For each color channel (RGB) let the 'actual bias value' be the bias value
multiplied by (ResultAlpha(X,Y)-bias). After applying the kernelMatrix and divisor, add
the 'actual bias value' to each component (RGB).
2. For the alpha channel, unless preserveAlpha is 'true', add the [unmodified]
bias value.
]]
Why use (ResultAlpha(X,Y)-bias)? If you just use ResultAlpha it does
exactly what you'd expect, if you specify bias=0.5 you get a
(transparent) gray response. This also applies to the case when
preserveAlpha=true.