rsvg -- apparent error in parsing SVG files (gradients)


Author: anonmoos

With the recent software updates, there seem to have been changes in how SVG files are processed. With SVG files generated by CorelDRAW (which use a particular indirect way of referring to style information), it seems that only the _first_ gradient in the SVG file is processed -- while all subsequent gradients are completely ignored. Unfortunately, this really messes up the rendering of such files (compare how looks in an SVG-viewing program to how it is rendered to a PNG by rsvg), and it will really be a pain to fix such files manually. Therefore it would be nice if the SVG (or XML?) parsing bug could be fixed... ~~~~

Version: unspecified
Severity: normal

bzimport added a subscriber: wikibugs-l.
bzimport set Reference to bz27832.
bzimport created this task.Via LegacyMar 3 2011, 6:08 AM
TheDJ added a comment.Via ConduitMar 3 2011, 9:00 AM

Ehm, did this file EVER render on Mediawiki using rsvg ? I highly doubt it. In that case, it's not new behavior, and thus not due to the recent changes.

Seems to me that the librsvg doesn't support xlink, but i'm not sure.

bzimport added a comment.Via ConduitMar 3 2011, 7:38 PM

anonmoos wrote:

I don't really know, but there were a number of SVG files that became broken when Mediawiki 1.17 brought in stricter namespace enforcement, and when the namespace problems were fixed with these files, it then appeared that a number of CorelDRAW files which have been being used in various Wikipedia articles for months or years now had quite strange renderings, due to only one gradient per file working.

The SVG support on Wikimedia Commons etc. definitely _does_ support xlink (since a number of somewhat basic SVG functionalities would be impossible without xlink), but in CorelDRAW files, all non-gradient stylings are applied to the relevant elements, but only _ONE_ gradient styling works per file. This can perhaps be seen slightly more clearly in , where only the first gold-brown gradient in the file is rendered (in the large flame on top of the salamander's upper back), while all the other gold-brown gradients in the large flames in the file are completely ignored (leaving hollow outlines). This sure seems like a bug to me... ~~~~

MarkAHershberger added a comment.Via ConduitMar 4 2011, 7:53 PM

Created attachment 8240
firefox vs librsvg

I don't know what firefox uses to display svg's but Emacs uses librsvg and you can see that they both show some funky gradiants in this screenshot.


bzimport added a comment.Via ConduitMar 5 2011, 7:30 AM

anonmoos wrote:

Re: Attachment 8240 -- The currently most-recently uploaded version of File:Differencing_en.svg on Commons displays fine in both FireFox and Adobe SVG plugin, but as a bunch of black rectangles in the version of Inkscape I have (which is kind of old, however). Applying only the first gradient in a file clearly seems to be buggy behavior...

bzimport added a comment.Via ConduitMar 5 2011, 7:37 AM

anonmoos wrote:

Display of Commons file Differencing_en.svg in FireFox on my system


TheDJ added a comment.Via ConduitDec 4 2011, 8:58 PM

Created attachment 9609
render of image after the recent librsvg upgrade


bzimport added a comment.Via ConduitDec 5 2011, 4:06 PM

anonmoos wrote:

Re: latest attachment -- some other bugs seem to have been fixed, but this basic bug has not been.

See for how it should display...

Add Comment

Column Prototype
This is a very early prototype of a persistent column. It is not expected to work yet, and leaving it open will activate other new features which will break things. Press "\" (backslash) on your keyboard to close it now.