DE
Inkscape - wie man svg zu png in der Konsole konvertieren?
3 points
Mit Inkscape und Bash ist es möglich, eine *.svg
Datei auf folgende Weise in eine *.png
Datei umzuwandeln.
xxxxxxxxxx
1
$ "/C/Program Files/Inkscape/inkscape.exe" -z -e "my_output_file.png" -w 100 -h 40 "my_input_file.svg"
2
​
3
Background RRGGBBAA: ffffff00
4
Area 0:0:1199.79:3284.24 exported to 100 x 40 pixels (1.16922 dpi)
5
Bitmap saved as: my_output_file.png
Hinweis:
-w 100 -h 40
bedeutet, dass die Größe der ausgegebenen Grafiken 100x40 px beträgt.
Bei diesem Ansatz wird die Höhe automatisch berechnet, um das ursprüngliche Verhältnis zwischen Breite/Höhe
beizubehalten.
xxxxxxxxxx
1
$ "/C/Program Files/Inkscape/inkscape.exe" -z -e "my_output_file.png" -w 100 "my_input_file.svg"
2
​
3
Background RRGGBBAA: ffffff00
4
Area 0:0:1199.79:3284.24 exported to 100 x 274 pixels (8.0014 dpi)
5
Bitmap saved as: my_output_file.png
Bei diesem Ansatz wird die Höhe automatisch berechnet, um das ursprüngliche Verhältnis zwischen Breite/Höhe
beizubehalten.
xxxxxxxxxx
1
$ "/C/Program Files/Inkscape/inkscape.exe" -z -e "my_output_file.png" -h 300 "my_input_file.svg"
2
​
3
Background RRGGBBAA: ffffff00
4
Area 0:0:1199.79:3284.24 exported to 110 x 300 pixels (8.76915 dpi)
5
Bitmap saved as: my_output_file.png