I would like to convert a simple svg graphic to a jpeg one. Here is the svg source code:
<svg style="overflow: hidden; position: relative;"
xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
width="300" version="1.1" height="200">
<image x="10" y="10" width="276" height="110"
xlink:href="http://images.google.com/intl/de_ALL/images/logos/images_logo_lg.gif"
stroke-width="1"></image>
<rect x="0" y="150" height="10" width="300" style="fill: #000000"/>
</svg>
If i do the conversion on my windows XP mashine with ImageMagick 6.7.8 all is working fine.
convert test.svg test.jpg
If i do the same conversion on my linux server (Debian 6.0 ImageMagick 6.6.0) get only the black line.
I tried to upgrade to the latest Imagemagick version on my linux mashine but i get no newer version from the repository.
But i'm not sure if the use of external images is a feature from the newer version, or if it is a configuration issue.
Thanks for any suggestions!
If there is no newer version in the Debian repository, your options are:
Compile it yourself from the ImageMagick source code. Instructions are here.
Install a pre-compiled non-Debian binary package (.tar.gz).
Use Google and search for the official Debian Squeeze (a.k.a. 6.0) 'backport' repository. If you are lucky, there may be a newer ImageMagick available.
You may also try Apache Batik SVG Rasterizer
It does fetch external images.
@Wolfgang
I have almost the same verison of imagemagick as yours. (The release is not the same, but I don't think that will cause problem)
And my system is :
I have tested in my system, it works well the command.
Or it exist another command :
It could be installed by type (in Ubuntu) :
And to convert a SVG to PNG, the command is :
You might want to check your version with
convert --version
the following version happily does the intended conversion:
It is available in the current macports port.
This version:
In Ubuntu 12.04 LTS did not work ...