我觉得我必须做一些愚蠢的错事,但我无法让它发挥作用.这是我从cmd运行的命令:
inkscape.com "C:\path\ship.svg" -e --export-png="C:\Path\ship.png" --without-gui
Run Code Online (Sandbox Code Playgroud)
作为回报,我得到:
WARNING: File path "--export-png=C:\path\ship.png" includes directory that doesn't exist.
它确实存在.我错过了什么?
Mar*_*ski 14
只是 2021 年的更新:
inkscape \
--export-width=128 \
--export-type=png \
--export-filename="C:\path\ship.png" \
"C:\path\build.svg"
Run Code Online (Sandbox Code Playgroud)
或者如果你想要透明的 PNG,请添加--export-background-opacity=0:
inkscape \
--export-background-opacity=0 \
--export-width=128 \
--export-type=png \
--export-filename="C:\path\ship.png" \
"C:\path\build.svg"
Run Code Online (Sandbox Code Playgroud)
-e和--export-png是相同的参数,根据该文档.-e只是简短的版本.所以你应该使用其中一个,但不能两个都使用.
因为你有-e,程序认为这--export-png="C:\Path\ship.png"是png文件的路径.
改成:
inkscape.com "C:\path\ship.svg" -e "C:\Path\ship.png" --without-gui
Run Code Online (Sandbox Code Playgroud)
要么:
inkscape.com "C:\path\ship.svg" --export-png="C:\Path\ship.png" --without-gui
Run Code Online (Sandbox Code Playgroud)