我有一个包含许多多边形的SVG:
https://github.com/barrycarter/bcapps/blob/master/sample-data/current-temps.svg
看起来有点像这样:
裁剪此项并转换为PNG可以正常工作:
convert -crop 100x100+200+150 current-temps.svg /tmp/exhb2.png
Run Code Online (Sandbox Code Playgroud)
但是,裁剪和缩放失败:
convert -crop 100x100+200+150 -scale 1000x750 current-temps.svg /tmp/exhb3.png
Run Code Online (Sandbox Code Playgroud)
在裁剪之前如何让ImageMagick"放大"SVG?
(我意识到ImageMagick只能读取,而不是写入SVG格式,但它仍然能够做我想要的吗?)
编辑/解决:
谢谢,robermorales.
inkscape -z -e out4.png -w 1000 -h 1000 -a 200:200:400:400 current-temps.svg
Run Code Online (Sandbox Code Playgroud)
(例如)像魅力一样工作.
我也意识到复制SVG,调整变换线:
<g transform="scale(3,3) rotate(-90) translate(-90,180)">
Run Code Online (Sandbox Code Playgroud)
然后转换为PNG是另一种解决方案.
归档时间: |
|
查看次数: |
3358 次 |
最近记录: |