Sample Header Ad - 728x90

Convert SVG to PNG using the command line with '-w' and '-h' values applied as a "box"

0 votes
1 answer
348 views
Here is an SVG image from Wikipedia: (Downloadable version: https://upload.wikimedia.org/wikipedia/commons/3/3d/CH-Hinweissignal-Wegweiser_f%C3%BCr_Hauptstrassen.svg)
image/svg+xml
The following commands successfully converts it to 2000×493 and 406×100 pixel PNGs respectively: - inkscape -w 2000 input.svg -o output.png - inkscape -h 100 input.svg -o output.png But if I specify both width and height (-w 2000 -h 100), both the values are used forcefully, and so the resulting image is distorted (2000×100 px). Is it possible to specify them in such a way that they are applied as a "box" instead, that is, - inkscape -w 2000 -h 100 input.svg -o output.png should results in 2000×493 px image - inkscape -w 100 -h 2000 input.svg -o output.png should results in 100×25 px image
Asked by jsx97 (1347 rep)
Aug 2, 2024, 01:29 PM
Last activity: Aug 19, 2024, 04:38 PM