converting svg to png error

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
djmon84
Posts: 8
Joined: 2010-04-05T04:55:59-07:00
Authentication code: 8675308

converting svg to png error

Post by djmon84 »

Hi all! (sorry for my english)

I'm having problems converting svg to png, What happens?

Source svg image:
Image

The code:

Code: Select all

convert c:\test.svg c:\test.png
Result:
Image

i'm using the last version for windows: ImageMagick-6.8.0-4-Q16-windows-dl.

I tried with differents svg files, and always the same (wrong) result.What im doing wrong?

Thanks!
djmon84
Posts: 8
Joined: 2010-04-05T04:55:59-07:00
Authentication code: 8675308

Re: converting svg to png error

Post by djmon84 »

i tried too with php + imagick with identical result....
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: converting svg to png error

Post by fmw42 »

Each SVG renderer can be different. They may all not recognized the full set of commands.

In IM you can use the internal svg renderer, but if you want something more precise/functional, install the RSVG delegate and see if that helps.
You can see if it is configured by

convert -list configure

and see if rsvg is listed on the line DELEGATES.

Or

convert -list format

and look at the line regarding SVG and see if it shows the RSVG rather than xml

Sorry I am not a windows user so cannot help install it. Search the internet for SVG delegate librariy and find one for Windows.
djmon84
Posts: 8
Joined: 2010-04-05T04:55:59-07:00
Authentication code: 8675308

Re: converting svg to png error

Post by djmon84 »

thank you very much for your help!

I have found this delegate library for svg in windows:

http://opensourcepack.blogspot.com.es/2 ... -tool.html

But i don't know how to install/use it...

I have added this node in the delegates.xml using the commands of the delegate library:

Code: Select all

<delegate decode="svg" encode="png" command="rsvg-convert %i --dpi-x=%x --dpi-y=%i -w=%w -h=%h --output %o"/>
And i dont have no idea of how to continue...

Any help would be helpful!
Post Reply