Expand description
Build-time icon utilities for uzor apps.
Convert an SVG asset into PNG (single size) or .ico (multi-size Windows icon)
during build.rs. Designed to be called from a build script:
// In build.rs:
fn main() {
uzor_icon::svg_to_png("assets/logo.svg", "icon-32.png", 32).unwrap();
uzor_icon::svg_to_ico("assets/logo.svg", "icon.ico", &[16, 32, 48, 256]).unwrap();
}Enums§
- Icon
Error - Error type for icon conversion operations.
Functions§
- svg_
bytes_ to_ ico_ bytes - Convert raw SVG bytes to a multi-size
.icobinary blob. - svg_
bytes_ to_ png_ bytes - Convert raw SVG bytes to PNG bytes at the given size.
- svg_
bytes_ to_ rgba - Convert raw SVG bytes to a flat RGBA buffer of
size × size × 4bytes. - svg_
to_ ico - Render an SVG file to a multi-size Windows
.icofile. - svg_
to_ png - Render an SVG file to a single-size PNG file.
Type Aliases§
- Result
- Alias for
Result<T, IconError>.