Re: feComponentTransfer

Adam <[email protected]> Wed, 5 Aug 2009 01:32:46 -0700 (PDT)
Newsgroups gmane.comp.mozilla.devel.svg
Organization http://groups.google.com
Message-ID <f6e76c03-198e-4e67-a7cd-fc37d99550bb@v36g2000yqv.googlegroups.com>
On 3 srp, 16:12, Boris Zbarsky <[email protected]> wrote:
> Adam wrote:
> > I am sorry, slope is 0.5 (that is what I called c) and intercept 0.
> > But the issue is that in different programs I get very different
> > results. In one case blue(255) is transferd to blue 180 and in thers
> > to blue 127 (I wrote 123, but should be 127). But I think for these
> > parametrs it should be 127.
>
> Should be, yes.  Can you point to a testcase showing the problem?
>
> -Boris

it is as simpe as:

<?xml version="1.0" ?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/
Graphics/SVG/1.1/DTD/svg11.dtd">
<svg width="400px" height="150px" version="1.1" xmlns="http://
www.w3.org/2000/svg">
	<desc>Gradienty</desc>
	<defs>
		<linearGradient id="Gradient01">
			<stop offset="0%" stop-color="#000000" />
			<stop offset="100%" stop-color="#0000FF" />
		</linearGradient>
		<filter id="test" filterUnits="objectBoundingBox"  x="0%" y="0%"
width="100%" height="100%">
			<feComponentTransfer>
				<feFuncB type="linear" slope=".5" intercept="0.0"/>
			</feComponentTransfer>
		</filter>
	</defs>
<rect x="20px" y="20px" width="256px" height="20px" fill="url
(#Gradient01)"  filter="url(#test)" />
<rect x="20px" y="60px" width="256px" height="20px" fill="#0000ff"
filter="url(#test)" />
<rect x="20px" y="100px" width="256px" height="20px" fill="#0000ff" />
</svg>

now I have another issue concerning filters. Blending filters are not
working properly too. e.g: http://www.w3.org/TR/SVG11/images/filters/feBlend.svg
and I do not think that solutions given by feColorMatrix are right
too, I get different results when I am multiplying matrices using
pencil and paper. Thanks for your previous responses.