Page 1 of 1

Serious issues with SVG files handling

Posted: 2008-09-08T02:14:35-07:00
by redna379
Hello.
I'm experiencing huge problems with SVG files.
First of all, some infos on my actual versions (btw, i tried also with the very latest one, and all the issues are exactly the same)
convert --version
Version: ImageMagick 6.4.2 08/02/08 Q16 OpenMP http://www.imagemagick.org
Copyright: Copyright (C) 1999-2008 ImageMagick Studio LLC

convert -list format | grep SVG
MSVG SVG rw+ ImageMagick's own SVG internal renderer
SVG SVG rw+ Scalable Vector Graphics (XML 2.6.32)
SVGZ SVG rw+ Compressed Scalable Vector Graphics (XML 2.6.32)
Now, here's the main issue. A simple SVG => PNG conversion like this gives this output:
convert +antialias test.svg test.png
convert: Must specify image size `/tmp/magick-XXvlzGaK'.
convert: missing an image filename `test.png'.
The very same thing happens also when using identify, which i use to determine the SVG file size for a given DPI:
identify --verbose test.svg
identify: Must specify image size `/tmp/magick-XXQCCupc'.

identify +antialias -density 72 -format "%w %h" test.svg
identify: Must specify image size `/tmp/magick-XXCob8xA'.
But, if i try those very same commands using the old IM 6.3.7-3 all is fine, convert works and identify returns fine outputs.
Any hint on how to fix this? What's causing the "Must specify image size" error?

BTW, if needed, this is one of the SVGs i'm trying with:
http://designer.realtimedesigner.com/im ... s/7077.svg

Thank you in advance.

Re: Serious issues with SVG files handling

Posted: 2008-09-09T02:09:15-07:00
by redna379
I tried with both MSVG and RSVG, anyhow generally i use MSVG.
At the end, what i need is to determine the size of an SVG file, given the DPI. SVG files are provided by users, so i cannot know in advance the size them have.

If i add the -size option to the identify command, i simply get, as width and height, the params i passed to -size itself.
but something like:
identify +antialias -density 72 -format "%w %h" msvg:test.svg
works fine with 6.3.7-3.

So my silly question is: is there a way, with 6.4.2, to use identify to find out the width and height of an SVG file at a given DPI?

Re: Serious issues with SVG files handling

Posted: 2008-09-09T22:48:58-07:00
by anthony
Something is strange the RSVG programs do seem to be able to extract some width and height info form the initial <svg ....> statment in the file, but IM is not.

I have a feeling that all the 'sodipodi:' parameters that are also present is confusing IM. Or prehaps it is the <!-- ... --> comment that is present just before the <svg ... > tag.

I would report a bug in the bugs forum with the SVG image link you gave above.

Re: Serious issues with SVG files handling

Posted: 2008-09-10T03:09:44-07:00
by redna379
Thank you very much, i'll wait for news from there