使用inkscape命令行将svg转换为png失败

时间:2016-01-11 15:56:17

标签: svg png inkscape

我觉得我必须做一些愚蠢的错事,但我无法让它发挥作用。这是我从cmd运行的命令:

inkscape.com "C:\path\ship.svg" -e --export-png="C:\Path\ship.png" --without-gui

作为回报,我得到:

WARNING: File path "--export-png=C:\path\ship.png" includes directory that doesn't exist.

确实存在。我错过了什么?

1 个答案:

答案 0 :(得分:6)

-e--export-png是相同的参数according to the docs-e只是简短版本。所以你应该使用其中一个,但不能两个都使用。

因为你有-e,程序会认为--export-png="C:\Path\ship.png"是png文件的路径。

更改为:

inkscape.com "C:\path\ship.svg" -e "C:\Path\ship.png" --without-gui

或:

inkscape.com "C:\path\ship.svg" --export-png="C:\Path\ship.png" --without-gui