使用Imagemagick将SVG转换为JPEG,缺少外部光栅图形 [英] Convert SVG to JPEG with Imagemagick, missing external raster graphics
问题描述
我想将简单的svg图形转换为jpeg图形。这是svg源代码:
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>
如果我使用ImageMagick 6.7.8进行Windows XP mashine的转换,一切正常。
If i do the conversion on my windows XP mashine with ImageMagick 6.7.8 all is working fine.
convert test.svg test.jpg
如果我在我的linux服务器(Debian 6.0 ImageMagick 6.6.0)上执行相同的转换,则只获取黑线。
If i do the same conversion on my linux server (Debian 6.0 ImageMagick 6.6.0) get only the black line.
我试图升级到我的linux mashine上的最新Imagemagick版本但我没有从存储库中获得更新的版本。
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.
感谢您的任何建议!
推荐答案
你可能会想要查看你的版本
You might want to check your version with
convert --version
convert --version
以下是rsion愉快地做了预期的转换:
the following version happily does the intended conversion:
Version: ImageMagick 6.7.7-0 2012-05-27 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2012 ImageMagick Studio LLC
Features: OpenCL
它在当前的macports端口中可用。
It is available in the current macports port.
此版本:
Version: ImageMagick 6.6.9-7 2012-04-30 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2011 ImageMagick Studio LLC
Features: OpenMP
在Ubuntu 12.04 LTS无效...
In Ubuntu 12.04 LTS did not work ...
这篇关于使用Imagemagick将SVG转换为JPEG,缺少外部光栅图形的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!