ksvgtopng5

converts SVG files to PNG format at a specified resolution

TLDR

Convert SVG to PNG
$ ksvgtopng5 [width] [height] [path/to/file.svg] [output.png]

SYNOPSIS

ksvgtopng5 width height input.svg output.png

DESCRIPTION

ksvgtopng5 converts SVG (Scalable Vector Graphics) files to PNG (Portable Network Graphics) format at a specified resolution. It is part of the KDE CLI tools and uses Qt's SVG rendering.

PARAMETERS

width

Output image width in pixels
height
Output image height in pixels
input.svg
Path to input SVG file (should be absolute path)
output.png
Path for output PNG file

INSTALL

sudo apt install kde-cli-tools
sudo dnf install kde-cli-tools
sudo pacman -S kde-cli-tools
sudo apk add kde-cli-tools

CAVEATS

The SVG input path should be an absolute path for reliable operation. Complex SVG features may not render identically to web browsers.

SEE ALSO

rsvg-convert(1), inkscape(1), convert(1)