Last modified: 2012-11-22 23:09:42 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T29832, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 27832 - rsvg -- apparent error in parsing SVG files (gradients)
rsvg -- apparent error in parsing SVG files (gradients)
Status: NEW
Product: Wikimedia
Classification: Unclassified
SVG rendering (Other open bugs)
All All
: Normal normal (vote)
: ---
Assigned To: Nobody - You can work on this!
Depends on:
Blocks: svg
  Show dependency treegraph
Reported: 2011-03-03 06:08 UTC by AnonMoos
Modified: 2012-11-22 23:09 UTC (History)
4 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---

firefox vs librsvg (320.30 KB, image/png)
2011-03-04 19:53 UTC, Mark A. Hershberger
Display of Commons file Differencing_en.svg in FireFox on my system (89.59 KB, image/jpeg)
2011-03-05 07:37 UTC, AnonMoos
render of image after the recent librsvg upgrade (95.71 KB, image/png)
2011-12-04 20:58 UTC, Derk-Jan Hartman

Description AnonMoos 2011-03-03 06:08:00 UTC
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... ~~~~
Comment 1 Derk-Jan Hartman 2011-03-03 09:00:27 UTC
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.
Comment 2 AnonMoos 2011-03-03 19:38:41 UTC
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... ~~~~
Comment 3 Mark A. Hershberger 2011-03-04 19:53:27 UTC
Created attachment 8240 [details]
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.
Comment 4 AnonMoos 2011-03-05 07:30:20 UTC
Re: Attachment 8240 [details] -- 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...
Comment 5 AnonMoos 2011-03-05 07:37:41 UTC
Created attachment 8249 [details]
Display of Commons file Differencing_en.svg in FireFox on my system
Comment 6 Derk-Jan Hartman 2011-12-04 20:58:28 UTC
Created attachment 9609 [details]
render of image after the recent librsvg upgrade
Comment 7 AnonMoos 2011-12-05 16:06:13 UTC
Re: latest attachment -- some other bugs seem to have been fixed, but this basic bug has not been.

See for how it should display...

Note You need to log in before you can comment on or make changes to this bug.