Page MenuHomePhabricator

Only first gradient in the SVG file seems to be processed
Open, LowPublic


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



Event Timeline

bzimport raised the priority of this task from to Normal.Nov 21 2014, 11:31 PM
bzimport set Reference to bz27832.
bzimport added a subscriber: Unknown Object (MLST).
bzimport created this task.Mar 3 2011, 6:08 AM
TheDJ added a comment.Mar 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.

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... ~~~~

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.


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...

anonmoos wrote:

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


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

Created attachment 9609
render of image after the recent librsvg upgrade


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...

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptNov 8 2015, 5:54 AM
Aklapper renamed this task from rsvg -- apparent error in parsing SVG files (gradients) to Only first gradient in the SVG file seems to be processed.Mar 8 2016, 11:01 PM
Aklapper set Security to None.