Top community members
All Wiki Articles Create Wiki Article

Many years me and my friends we were volunteers on my university doing programming classes for young people.

I got main conclusion: Young people are awesome, especially students, because they always bring new and fresh ideas :)
* I loved to do it but my time is limited

  I decided to create something that will help millions of students

Now I am here

co-founder

Inkscape - how to convert svg to png in console?

0 contributions
10 points

Using Inkscapse and Bash it is possible to *.svg file to *.png in following way.

1.  Inkscape and Bash console on Microsoft Windows example

1.1. With exact size

$ "/C/Program Files/Inkscape/inkscape.exe" -z -e "my_output_file.png" -w 100 -h 40 "my_input_file.svg"

Background RRGGBBAA: ffffff00
Area 0:0:1199.79:3284.24 exported to 100 x 40 pixels (1.16922 dpi)
Bitmap saved as: my_output_file.png

Note: -w 100 -h 40 means the size of output graphics will be 100x40 px.

1.2. With keeping ratio and scaling to width

Using this approach height will be computed automaticaly to keep oryginal width/height proportion.

$ "/C/Program Files/Inkscape/inkscape.exe" -z -e "my_output_file.png" -w 100 "my_input_file.svg"

Background RRGGBBAA: ffffff00
Area 0:0:1199.79:3284.24 exported to 100 x 274 pixels (8.0014 dpi)
Bitmap saved as: my_output_file.png

1.3. With keeping ratio and scaling to height

Using this approach width will be computed automaticaly to keep oryginal width/height proportion.

$ "/C/Program Files/Inkscape/inkscape.exe" -z -e "my_output_file.png" -h 300 "my_input_file.svg"

Background RRGGBBAA: ffffff00
Area 0:0:1199.79:3284.24 exported to 110 x 300 pixels (8.76915 dpi)
Bitmap saved as: my_output_file.png

See also

  1. Inkscape - how to convert svg to png? 
0 contributions

Checkout latest Findings & News:

Checkout latest questions:

Checkout latest wiki articles:

Hey ūüĎč
Would you like to know what we do?
  • Dirask is IT community, where we share coding knowledge and help each other to solve coding problems.
  • We welcome everyone,
    no matter what the experience,
    no matter how basic the question is,
    this community will help you.
Read more