Coefficients in FeColorMatrix, Fecomposite (limits, behaviour with neg val...)
Hi,
I think I'll be a little bit off topic but I don't know where to ask (my question about svg on inkscapeforum are left unanswered)
Can someone point me to reference papers (or friendly forum) about coefficients in FeColorMatrix, Fecomposite ? Something that could answer the following questions :
What are safe values ? For exemple inkscape UI allows x10 for k1,k2,k3,k4 in FeComposite, can I push to 255 ? 256 ? 1000000 ? I don't see anything in SVG spec about max values for those coeffs.
What about neg values ? When does clipping occur ? Particularly for k4.
What is the effect of a <100% opacity source or dest ? (On clipping for exemple)
I try to port svg2 PorterDuff operations in svg 1 and I often get strange results (to me) with inkscape. Is there some known bugs in rendering fecomposite with neg values in inkscape ?
Thx.
V.
Bonus question : why is inkscape so slow at rendering filters ? ;)
On 25-10-12 22:41, pennec victor wrote:
Hi,
I think I'll be a little bit off topic but I don't know where to ask (my question about svg on inkscapeforum are left unanswered)
Can someone point me to reference papers (or friendly forum) about coefficients in FeColorMatrix, Fecomposite ? Something that could answer the following questions :
What are safe values ? For exemple inkscape UI allows x10 for k1,k2,k3,k4 in FeComposite, can I push to 255 ? 256 ? 1000000 ? I don't see anything in SVG spec about max values for those coeffs.
Essentially you can use any values you like. The SVG spec does state that the result of each primitive is clamped, but in a single primitive it is basically up to the implementation (although I would expect an implementation to basically allow anything "reasonable"). In the past I've played around a bit with feComposite, and I believe I ran into some issues here and there, but mostly it was fine.
The best thing is to simply try your file in as many different renderers as possible.
What is the effect of a <100% opacity source or dest ? (On clipping for exemple)
I'm not entirely sure what you mean, but in principle it should have no effect. Well, obviously the opacity is less, and this will be reflected in the result, but that is about it. Of course, if any clamping is done (usually at the end of the operation), then the colour values will be clamped to the opacity when using premultiplied colours, but that's normal.
I try to port svg2 PorterDuff operations in svg 1 and I often get strange results (to me) with inkscape. Is there some known bugs in rendering fecomposite with neg values in inkscape ?
Actually, now that you mention it, yes: https://bugs.launchpad.net/inkscape/+bug/1044989 I'll probably look into it tomorrow.
Bonus question : why is inkscape so slow at rendering filters ? ;)
This has been asked and answered before, so I won't go into it in detail (if you're really interested, I'd recommend searching the archives). Basically, each filter primitive constitutes a very expensive copy of the image. Adding in transformations can add more in some cases, and using something like Gaussian blur (which is not per-pixel, but requires data from a neighbourhood) makes things even less efficient. At least, that's my theory, it hasn't been tested yet, as all these problems are non-trivial to solve.
About slowness at rendering, are you using 0.48 or a 0.48 devel with Cairo ? Cairo does the job fairly fast and you can set up multithreading in Edit/Preferences/Rendering/
ivan
________________________________ De : pennec victor <v1nkscaper@...400...> À : inkscape-devel inkscape-devel@lists.sourceforge.net Envoyé le : Jeudi 25 octobre 2012 22h41 Objet : [Inkscape-devel] Coefficients in FeColorMatrix, Fecomposite (limits, behaviour with neg val...)
Hi,
I think I'll be a little bit off topic but I don't know where to ask (my question about svg on inkscapeforum are left unanswered)
Can someone point me to reference papers (or friendly forum) about coefficients in FeColorMatrix, Fecomposite ? Something that could answer the following questions :
What are safe values ? For exemple inkscape UI allows x10 for k1,k2,k3,k4 in FeComposite, can I push to 255 ? 256 ? 1000000 ? I don't see anything in SVG spec about max values for those coeffs.
What about neg values ? When does clipping occur ? Particularly for k4.
What is the effect of a <100% opacity source or dest ? (On clipping for exemple)
I try to port svg2 PorterDuff operations in svg 1 and I often get strange results (to me) with inkscape. Is there some known bugs in rendering fecomposite with neg values in inkscape ?
Thx.
V.
Bonus question : why is inkscape so slow at rendering filters ? ;)
------------------------------------------------------------------------------ Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download AppDynamics Lite for free today: http://p.sf.net/sfu/appdyn_sfd2d_oct _______________________________________________ Inkscape-devel mailing list Inkscape-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/inkscape-devel
On 26-10-12 09:47, Ivan Louette wrote:
About slowness at rendering, are you using 0.48 or a 0.48 devel with Cairo ? Cairo does the job fairly fast and you can set up multithreading in Edit/Preferences/Rendering/
Just to avoid any misconceptions, Cairo is not taking care of our filters. However, Krzysztof did much more than just change our renderer to use Cairo. So yes, it is a good idea to try the development version, but the filters are not handled by Cairo.
However, thanks for Krzysztof's work, filters also render much faster ! Even the most complex ones.
ivan
________________________________ De : Jasper van de Gronde <th.v.d.gronde@...528...> À : inkscape-devel@lists.sourceforge.net Envoyé le : Vendredi 26 octobre 2012 11h16 Objet : Re: [Inkscape-devel] Coefficients in FeColorMatrix, Fecomposite (limits, behaviour with neg val...)
On 26-10-12 09:47, Ivan Louette wrote:
About slowness at rendering, are you using 0.48 or a 0.48 devel with Cairo ? Cairo does the job fairly fast and you can set up multithreading in Edit/Preferences/Rendering/
Just to avoid any misconceptions, Cairo is not taking care of our filters. However, Krzysztof did much more than just change our renderer to use Cairo. So yes, it is a good idea to try the development version, but the filters are not handled by Cairo.
------------------------------------------------------------------------------ Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download AppDynamics Lite for free today: http://p.sf.net/sfu/appdyn_sfd2d_oct _______________________________________________ Inkscape-devel mailing list Inkscape-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/inkscape-devel
participants (3)
-
Ivan Louette
-
Jasper van de Gronde
-
pennec victor