CmdID

CmdID / Commands

svg2png

Render an SVG image to a PNG image using cairo. tldr-pages

On several platforms

Opens CmdID with your command. It is read in your browser and sent nowhere.

Several platforms

from tldr-pages, CC BY 4.0

Convert an SVG file to PNG

svg2png path/to/file.svg path/to/output.pngIdentify

Convert an SVG file to PNG with a specific width (preserving aspect ratio)

svg2png --width 800 path/to/file.svg path/to/output.pngIdentify

Convert an SVG file to PNG with a specific height (preserving aspect ratio)

svg2png --height 600 path/to/file.svg path/to/output.pngIdentify

Convert an SVG file to PNG with both width and height (image centered in space)

svg2png --width 800 --height 600 path/to/file.svg path/to/output.pngIdentify

Convert an SVG file to PNG scaled by a factor

svg2png --scale 2.0 path/to/file.svg path/to/output.pngIdentify

Convert an SVG from stdin to PNG on stdout

cat path/to/file.svg | svg2png - - >path/to/output.pngIdentify

Flip the output image horizontally or vertically

svg2png --flipx path/to/file.svg path/to/output.pngIdentify