svgtoico

Travis Build Status AppVeyor Build Status dependency status

This is a small cross-platform CLI utility to convert SVG icons into Windows ICO files. SVG images are parsed and rasterised using Nano SVG, which is restricted to rendering flat filled shapes.

Build

To build svgtoico, install Rust then run

cargo build --release

to create a release executable at target/release/svg_to_ico (svg_to_ico.exe on Windows).

Usage

CLI

See the output of ./svg_to_ico -h for a description of the CLI parameters. You can specify the input SVG path, output ICO path, the DPI to interpret the SVG with, and the image sizes that should be included in the ICO.

Example:

./svg_to_ico -i icon.svg -o icon.ico

Library

You can also use svgtoico as a Rust library, just add it to your Cargo.toml:

[dependencies] svg_to_ico = "0.1"

then use it as shown in the example.