
On 11/12/10 12:49, Ivan Louette wrote:
Thanks also about your off topic comment. But I don't know how I could precise an xlink namespace in FeImage filters when it must be precised by the person who uses the filter. Of course this isn't correct for displaying in a browser but this file is done to be parsed by Inkscape and as you said it works
It seems that you manually pasted the new filter effects into an old filter.svg (created with ancient 'inkscape:version="0.46+devel r20644 custom"')? Otherwise Inkscape would have added the namespace declaration itself, as it normally does as soon as internal or external resources are linked via 'xlink:href'.
AFAIU all it would require is adding xmlns:xlink="http://www.w3.org/1999/xlink" to the top-level <svg> element of the enhanced or experimental 'filters.svg', along with the other already existing attributes. But maybe some SVG experts can confirm this?
(However I don't have problems to open it in 0.48.01 and 0.48 devel 9936 on kubuntu 10.04).
Yes, sorry - I was not precise: while it fails to open in Firefox, it does open in Inkscape (0.48 and trunk), but with tons of error messages on the console like this:
filters7-2010-10-13.svg:193: namespace error : Namespace prefix xlink for href on feImage is not defined
<feImage id="feImage3446" xlink:href="" result="result3" /> ^
another <off-topic>: There is a second issue with your filters alternate 8 and 9 I have experienced: As far as I could track it down, in the file there is a new filter effect (inkscape:label="Old postcard -NEW-") using ',' as decimal separators in the 'tableValues' for the 'feComponentTransfer' primitive.
<filter id="f174" inkscape:label="Old postcard -NEW-" x="0" y="0" width="1" height="1" inkscape:menu="Image paint and draw" inkscape:menu-tooltip="Slightly posterize and draw edges like on old printed postcards" color-interpolation-filters="sRGB"> <feFlood flood-color="rgb(255,204,0)" flood-opacity="0.1" result="result1" /> <feBlend in2="SourceGraphic" blend="normal" mode="darken" result="result6" /> <feComposite result="result8" operator="arithmetic" k2="1" /> <feColorMatrix result="result5" values="0" type="hueRotate" in="result8" /> <feConvolveMatrix result="result1" order="3 3" kernelMatrix="0 -1 0 -1 5.05 -1 0 -1 0 " divisor="1" in="result5" targetX="1" targetY="1" /> <feGaussianBlur result="result2" stdDeviation="2" in="result1" /> <feComponentTransfer result="result4" in="result2"> <feFuncR type="table" tableValues="0 0 0,2 0,2 0,4 0,4 0,6 0,6 0,8 0,8 1 1 1" /> <feFuncG type="table" tableValues="0 0 0,2 0,2 0,4 0,4 0,6 0,6 0,8 0,8 1 1 1" /> <feFuncB type="table" tableValues="0 0 0,2 0,2 0,4 0,4 0,6 0,6 0,8 0,8 1 1 1" /> </feComponentTransfer> <feBlend in2="result1" result="result3" mode="darken" in="result4" /> <feColorMatrix type="saturate" values="1" result="result7" /> <feComposite in2="SourceGraphic" operator="in" result="fbSourceGraphic" /> </filter>
This causes Inkscape launched with (e.g.) LANG="en_US.UTF-8" (decimal separator '.') to freeze when trying to parse the filter definitions.
After manually editing the SVG file (adding the xlink namespace declaration and replacing the ',' decimal separator with '.', the file opens without issues in Inkscape 0.48 and 0.48+devel (current).
Seems related to Bug #586059 “Period not accepted in filter matrices UI (FR locale and maybe others)”: https://bugs.launchpad.net/inkscape/+bug/586059
For shared filters.svg files it might be better to not use a localized Inkscape version (to be save) or verify that the decimal separators within the file are consistent.
Maybe one of the filter experts can take a look at this? </off-topic>
~suv