Commons:Graphics village pump/September 2012

From Wikimedia Commons, the free media repository
Jump to navigation Jump to search

Strange SVG rendering[edit]

Can anyone figure out why File:WIP Mehrstufige Entspannungsverdampfung.svg displays so differently in Wikimedia RSVG than in any other program? (Adobe SVG plugin, Inkscape, and Firefox all show it fine.) -- AnonMoos (talk) 14:19, 14 September 2012 (UTC)[reply]

Reduced everything to basic elements (moveto, lineto, cubic bezier curveto) to get it to display... AnonMoos (talk) 15:31, 2 November 2012 (UTC)[reply]

Strange rendering of soccer balls on File:Ball in and out of play.svg[edit]

The soccer balls do not render correctly

I have converted File:Ball in play.png to an SVG version File:Ball in and out of play.svg, but the soccer balls (taken from File:Soccer ball.svg do not render correctly due to the clipping paths, which are not working due to an RSVG bug. The clipping paths work correctly in Inkscape and IE 9. (if anyone does fix this problem, upload it under a different name such as File:Ball in and out of play 2.svg and add {{technically replaced}} to the description page of this file, this way it will be easier for the RSVG developers to fix the bug. Jfd34 (talk) 06:36, 18 September 2012 (UTC)[reply]

If it is a bug, then it's due to using clipping paths in a rather complex way in interaction with other things (defining a macro in the <defs>...</defs> section which calls on a clipping path, then scaling and translating the result when it is invoked by a <use...> call). I unpacked this a little to make it simpler (i.e. so that clipping is NOT invoked by a recursive call), and it works now. If you think separate files are necessary, you should do this yourself... AnonMoos (talk) 08:41, 18 September 2012 (UTC)[reply]
Good luck on your bug report, but I suspect that it won't be given too high a priority. If the soccer balls had been copied in your original SVG file in either of the two most natural ways (the whole ball as a single <g id="Ball"... which was then "use"d multiple times, or just copying the soccer-ball code four times without any <use...), then probably the bug would not have happened... AnonMoos (talk) 20:21, 19 September 2012 (UTC)[reply]

Yet another rendering problem[edit]

It seems that there is a problem with the rendering of svg images, in particular File:Copyright.svg is appearing as a black circle. Since it's a massively used image, can someone have a look at what is wrong with it? Thanks. --Cruccone (talk) 12:28, 20 September 2012 (UTC)[reply]

Since software updates about a year ago, style attributes in the <svg...> header are not necessarily interpreted throughout the file (as was formerly done). Here's a version which will work (can't upload because file is protected): AnonMoos (talk) 13:29, 20 September 2012 (UTC)[reply]
<?xml version="1.0" encoding="UTF-8"?>
<svg xmlns="http://www.w3.org/2000/svg" width="200" height="200">
<clipPath id="c"><path d="M45,45V155H155V111.5H125V88.5H155V45Z"/></clipPath>
<g stroke-width="23" fill="none" stroke="black">
<circle cx="100" cy="100" r="88.5"/>
<circle cx="100" cy="100" r="42.5" clip-path="url(#c)"/></g></svg>

Arrowheads rendering as shovels and artifacts.[edit]

A small handcrafted file is here.
https://secure.wikimedia.org/wikipedia/commons/wiki/File:CategoricalProduct0x0Test0.svg

Iceweasel, the Debian version of firefox, displays it properly. The code, along with several other diagrams, is also present in my Category2.xhtml .
http://members.shaw.ca/peasthope/Category2.xhtml

Nevertheless, the PNG created by Wikimedia displays several artifacts and displays the arrowheads as shovels. Can anyone suggest how the SVG might be changed so that the image displayed by the browser is not damaged, while errors in the PNG are mitigated or removed.

Thanks, PeterEasthope (talk) 15:57, 24 September 2012 (UTC) peasthope at shaw dot ca[reply]

First off, your file had two separate <svg tags, which makes me rather surprised that the file displayed at all! There are bugs in the RSVG implementation of the <marker tag, and I don't know about those in detail, or what to advise you to do to work around them; however, the file has a rather idiosyncratic coding style, which possibly doesn't help... AnonMoos (talk) 17:03, 24 September 2012 (UTC)[reply]

> First off, your file had two separate <svg tags ...

Category2.xhtml or CategoricalProduct0x0Test0.svg? Just reviewed Categorical...svg. Where is the second tag?

> ... idiosyncratic coding style, ...

?? Anyone care to offer a pointer or two? Thanks, PeterEasthope (talk) 00:48, 25 September 2012 (UTC)[reply]

You do know this isn't Usenet, right? I didn't look at anything off-site. Go to the original "18:18, 21 September 2012" upload of File:CategoricalProduct0x0Test0.svg ( http://upload.wikimedia.org/wikipedia/commons/archive/6/6d/20120924164934%21CategoricalProduct0x0Test0.svg ) and open it in a text editor, and you'll see the two <svg tags (one embedded inside the other), "as large as life and twice as natural". And all the defining of macro entities makes your file hard to read, and allows additional possibilities for things to go wrong which are hard to detect. It may be good "C" programming style, but it's semi-pointless as an SVG coding style... AnonMoos (talk) 07:00, 25 September 2012 (UTC)[reply]

> You do know this isn't Usenet, right?

Not Usenet? Now I'm really confused! 8~)

> Go to the original "18:18, 21 September 2012" upload ...

OK, yes, it was excerpted from a much bigger xhtml file; http://members.shaw.ca/Category2.xhtml . I minimized edits to simplify the extraction process. But your simplified version also has the artifacts and shovel markers.

> ... entities makes your file hard to read ...

Whereas "magic numbers" are prohibited in any introductory programming course.

> ... and allows additional possibilities for things to go wrong ...

Sheesh! Giving a name to a number is harmful? The name might suggest the meaning or purpose and that sure would be bad.

Seems the only way I can get arrowheads rather than shovels in the PNG is to dispense with use of <marker ...>. Will consider it. Would be nice if rsvg handled marker correctly.

Thanks for the feedback, ... PeterEasthope (talk) 00:06, 26 September 2012 (UTC)[reply]


DO NOT USE USENET REPLY QUOTING STYLES! It's not the way things are done here, and it fragments things in a way which makes it very difficult to conduct any form of useful coherent discussion... AnonMoos (talk) 03:56, 26 September 2012 (UTC)[reply]


So what is your favourite posting style? Several choices here. http://en.wikipedia.org/wiki/Posting_style Please don't ask for top-posting; and most people abandoned ALL-CAPS when video terminals replaced Teletypes; http://en.wikipedia.org/wiki/Teleprinter.
The conclusion of the discussion is merely, "Don't use <marker ...> in wikimedia.org." The limitation should be mentioned in usage instructions. If hidden somewhere, it should be more prominent. Thanks for the feedback, ... PeterEasthope (talk) 15:22, 26 September 2012 (UTC)[reply]
No it isn't. There are plenty of SVG files on Commons where "marker" arrowheads work as intended, and a number of others where they mostly work (they're in the right place, but are at an angle which is a multiple of 90° instead of the intended diagonal orientation). Unfortunately, I'm not up on the fine details of RSVG marker implementation bugs, so I can't advise you on that. AnonMoos (talk) 16:19, 26 September 2012 (UTC)[reply]

One last question for now. Can anyone tell me which version of librsvg is currently running on the Wikimedia server? I'd expect to see it in this page. http://www.mediawiki.org/wiki/Manual:Image_Administration#SVG Google found some mentions of version numbers in old discussions but I'm hunting for an authoritative current number. Thsnks, ... PeterEasthope (talk) 15:42, 27 September 2012 (UTC)[reply]

There was a syntax error, corrected 2012-10-05 and described in the comment in the file history. The shovels are arrowheads now. Regards, ... PeterEasthope (talk) 00:00, 8 October 2012 (UTC)[reply]