Options (3)
-w, --widthbooleanConvert an SVG file to PNG with a specific width (preserving aspect ratio)
Example:
svg2png {{[-w|--width]}} {{800}} {{path/to/file.svg}} {{path/to/output.png}}-h, --heightbooleanConvert an SVG file to PNG with a specific height (preserving aspect ratio)
Example:
svg2png {{[-h|--height]}} {{600}} {{path/to/file.svg}} {{path/to/output.png}}-s, --scalebooleanConvert an SVG file to PNG scaled by a factor
Example:
svg2png {{[-s|--scale]}} {{2.0}} {{path/to/file.svg}} {{path/to/output.png}}Examples (7)
Convert an SVG file to PNG
svg2png path/to/file.svg path/to/output.pngConvert an SVG file to PNG with a specific width (preserving aspect ratio)
svg2png [-w|--width] 800 path/to/file.svg path/to/output.pngConvert an SVG file to PNG with a specific height (preserving aspect ratio)
svg2png [-h|--height] 600 path/to/file.svg path/to/output.pngConvert an SVG file to PNG with both width and height (image centered in space)
svg2png [-w|--width] 800 [-h|--height] 600 path/to/file.svg path/to/output.pngConvert an SVG file to PNG scaled by a factor
svg2png [-s|--scale] 2.0 path/to/file.svg path/to/output.pngConvert an SVG from `stdin` to PNG on `stdout`
Flip the output image horizontally or vertically
svg2png --flipx path/to/file.svg path/to/output.pngmade by @shridhargupta | data from tldr-pages