SVG Scaling

Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
Post Reply
hexmode
Posts: 13
Joined: 2012-03-30T13:01:12-07:00
Authentication code: 8675308

SVG Scaling

Post 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.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: SVG Scaling

Post by fmw42 »

Have you tried RSVG vs IM built-in MSVG

What version of IM and exactly what command?
hexmode
Posts: 13
Joined: 2012-03-30T13:01:12-07:00
Authentication code: 8675308

Re: SVG Scaling

Post 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
hexmode
Posts: 13
Joined: 2012-03-30T13:01:12-07:00
Authentication code: 8675308

Re: SVG Scaling

Post 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.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: SVG Scaling

Post 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.
hexmode
Posts: 13
Joined: 2012-03-30T13:01:12-07:00
Authentication code: 8675308

Re: SVG Scaling

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