Page 1 of 1

SVG Scaling

Posted: 2012-06-26T13:20:40-07:00
by hexmode
We've got a problem with SVG scaling on http://commons.wikimedia.org/wiki/File:Flag_of_Iran.svg. This SVG is being thumbnailed to Image when it should look more like Image.

The issue came up on wikitech-l, but it seems like this is a bug in ImageMagick.

Re: SVG Scaling

Posted: 2012-06-26T15:30:24-07:00
by fmw42
Have you tried RSVG vs IM built-in MSVG

What version of IM and exactly what command?

Re: SVG Scaling

Posted: 2012-06-26T18:17:41-07:00
by hexmode
fmw42 wrote:Have you tried RSVG vs IM built-in MSVG

What version of IM and exactly what command?
Platonides gives this information in a follow-up. He doesn't provide information about the version of ImageMagick, though. The Wikimedia cluster was recently upgraded to Ubuntu Precise, IIUC, so that would be version 6.6.9.7.
Platonides wrote: I suspect we may be pulling the wrong developers.
OTOH, both rsvg and imagemagic seem to show a "dragonfly" in the center,
with inkscape showing instead the "trident", so it seems adequate to
drive it to the attention of both groups.
In fact, imagemagick isn't showing the 1px "border".

Code: Select all

 rsvg-convert -w 800 -h 457 '20120621203246!Flag_of_Iran.svg' > output.png
 convert -resize 800x457 '20120621203246!Flag_of_Iran.svg' output.png

Re: SVG Scaling

Posted: 2012-06-26T18:23:43-07:00
by hexmode
Note that Ryan provided a work-around that may help anyone who tries to solve this.
Ryan wrote: I fixed the rendering issue with the Iranian flag by making the tekbirs
slightly overlap the central field. Now it will look correct no matter
what thumbnail resolution you request.

Re: SVG Scaling

Posted: 2012-06-26T18:36:34-07:00
by fmw42
hexmode wrote:
fmw42 wrote:Have you tried RSVG vs IM built-in MSVG

What version of IM and exactly what command?
Platonides gives this information in a follow-up. He doesn't provide information about the version of ImageMagick, though. The Wikimedia cluster was recently upgraded to Ubuntu Precise, IIUC, so that would be version 6.6.9.7.
Platonides wrote: I suspect we may be pulling the wrong developers.
OTOH, both rsvg and imagemagic seem to show a "dragonfly" in the center,
with inkscape showing instead the "trident", so it seems adequate to
drive it to the attention of both groups.
In fact, imagemagick isn't showing the 1px "border".

Code: Select all

 rsvg-convert -w 800 -h 457 '20120621203246!Flag_of_Iran.svg' > output.png
 convert -resize 800x457 '20120621203246!Flag_of_Iran.svg' output.png

rsvg-convert is not an IM command to my knowledge. So I really think this is an RSVG problem and needs to be reported to some RSVG forum.

The convert -resize is an IM command. Nevertheless, if I use

convert -density 72 20120621203246!Flag_of_Iran.svg 20120621203246!Flag_of_Iran.png

I do not get the right result either. I am using RSVG delegate in IM. But that is not surprising since IM uses the RSVG library to render svg files.

I am using RSVG version as

SVG SVG rw+ Scalable Vector Graphics (RSVG 2.34.2)



If I do

convert -density 72 MSVG:20120621203246!Flag_of_Iran.svg 20120621203246!Flag_of_Iran.png

the result is even worse.


I am testing under IM 6.7.7.9 Q16 Mac OSX Snow Leopard

I am not an svg expert, so I will leave the rest to the IM developers.

Re: SVG Scaling

Posted: 2012-06-27T09:18:22-07:00
by hexmode
fmw42 wrote: rsvg-convert is not an IM command to my knowledge. So I really think this is an RSVG problem and needs to be reported to some RSVG forum.
I do understand that. I'm not asking ImageMagick developers to solve rsvg's problems. I apologize for the confusion.