Sorry Ben, <div><br></div><div>I thought you were referring to the actual svg <a href="http://wiki.openstreetmap.org/images/8/88/Belgium-trafficsign-a25.svg">http://wiki.openstreetmap.org/images/8/88/Belgium-trafficsign-a25.svg</a> looking back at your original message it's clear I wasn't paying attention. </div>
<div><br></div><div>The pngs clearly aren't being rendered transparent, the jaggies for me are showing up just a little fuzzy from the re-sampling. So, yes, I agree svg->png rasterization is broken.</div><div><br>
</div>
<div>-Tyler<br><br><div class="gmail_quote">On Tue, Jun 30, 2009 at 10:15 AM, Ben Laenen <span dir="ltr"><<a href="mailto:benlaenen@gmail.com">benlaenen@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im">Tyler wrote:<br>
> Rendering of SVG is done in browser,<br>
<br>
</div>No it isn't (here), it's done on the server by MediaWiki: it takes an svg and<br>
converts it to png (using rsvg or some other program on the server) when the<br>
image appears on a page, and it sends the png to the browser. The image used<br>
on <a href="http://wiki.openstreetmap.org/wiki/Image:Belgium-trafficsign-a25.svg" target="_blank">http://wiki.openstreetmap.org/wiki/Image:Belgium-trafficsign-a25.svg</a> for<br>
example is this png:<br>
<a href="http://wiki.openstreetmap.org/images/thumb/8/88/Belgium-trafficsign-" target="_blank">http://wiki.openstreetmap.org/images/thumb/8/88/Belgium-trafficsign-</a><br>
a25.svg/640px-Belgium-trafficsign-a25.svg.png<br>
<div class="im"><br>
> the link you sent to me rendered at an<br>
> appropriate size and very quickly.<br>
<br>
</div>Because it sends you the png which is cached by MediaWiki on the server. Once<br>
the conversion from svg to png is done once at a given size, you don't see any<br>
delays, but just take an svg on the wiki and put it in a test page at a size<br>
that wasn't rendered before, and it'll take a minute before you see the image<br>
in your browser. But anyway, the svg conversion time isn't a really big<br>
problem, as that's only seen once by the person editing a wiki page who<br>
entered the image into that page.<br>
<br>
The main problems are that:<br>
<br>
* the png images which were created from svg aren't transparent anymore. This<br>
was done correctly once, so you'll see a mix of images with transparent and<br>
opaque backgrounds on<br>
<a href="http://wiki.openstreetmap.org/wiki/WikiProject_Belgium/Conventions/Traffic_Signs" target="_blank">http://wiki.openstreetmap.org/wiki/WikiProject_Belgium/Conventions/Traffic_Signs</a><br>
although they all have transparent backgrounds actually (the transparent ones<br>
were rendered before the change happened on the server and because they're<br>
cached they stay transparent, if you take one of the transparent ones and put<br>
it on a page at a different size, they'll be opaque)<br>
<br>
* The jagged appearance of some svg images like<br>
<a href="http://wiki.openstreetmap.org/wiki/Image:Belgium-trafficsign-a25.svg" target="_blank">http://wiki.openstreetmap.org/wiki/Image:Belgium-trafficsign-a25.svg</a> (this<br>
happens in every browser I have, FireFox, Konqueror, Arora) and it's in the<br>
source code of the page: (from the same page mentioned above:)<br>
<br>
<img alt="Image:Belgium-trafficsign-a25.svg" src="/images/thumb/8/88/Belgium-<br>
trafficsign-a25.svg/640px-Belgium-trafficsign-a25.svg.png" width="720"<br>
height="600" border="0" /><br>
<br>
But the rendered png image isn't 720 by 600 pixels as it shows on the page,<br>
it's actually 640 by 533, and thus you get a stretched image which is creating<br>
the jagged appearance. I have no idea why this is, my own local mediawiki<br>
installation handles it all just fine.<br>
<font color="#888888"><br>
Ben<br>
<br>
<br>
</font></blockquote></div><br></div>