https://github.com/ortham/svg_to_ico
A utility and Rust library to convert SVG icons into Windows ICO files.
https://github.com/ortham/svg_to_ico
Last synced: 11 months ago
JSON representation
A utility and Rust library to convert SVG icons into Windows ICO files.
- Host: GitHub
- URL: https://github.com/ortham/svg_to_ico
- Owner: Ortham
- License: mit
- Created: 2018-04-08T09:45:37.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2025-07-20T10:23:35.000Z (11 months ago)
- Last Synced: 2025-07-20T12:13:18.698Z (11 months ago)
- Language: Rust
- Size: 330 KB
- Stars: 28
- Watchers: 1
- Forks: 5
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
svg_to_ico
==========
[](https://crates.io/crates/svg_to_ico)
[](https://docs.rs/crate/svg_to_ico)

[](https://deps.rs/repo/github/Ortham/svg_to_ico)
This is a small cross-platform CLI utility to convert SVG icons into Windows ICO
files. SVG images are parsed and rasterised using [resvg](https://github.com/RazrFalcon/resvg).
## Download
Precompiled binaries are [available](https://github.com/Ortham/svg_to_ico/releases/latest) for Windows and Linux. You can also `cargo install svg_to_ico` to build and install it from source.
## Build
To build svg_to_ico from a source archive/repository, install [Rust](https://www.rust-lang.org) then run
```
cargo build --release
```
from the archive/repository root 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 svg_to_ico 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](examples/library.rs).