Crate ico_builder

source ·
Expand description

A crate for creating multi-size ICO files from separate images. The images are automatically resized to the specified sizes.

§Examples

§Basic

In this example, the 16px, 24px, and 32px versions of this icon will be resized versions of app-icon-32x32.png while the 48px and 256px versions will be resized from app-icon-256x256.png.

IcoBuilder::default()
    .add_source_file("app-icon-32x32.png")
    .add_source_file("app-icon-256x256.png")
    .build_file("app-icon.ico");

§Custom Icon Sizes

If you want more fine grained control over which icon sizes are included, you can specify a custom list of icon sizes.

IcoBuilder::default()
    .sizes(&[16, 32])
    .add_source_file("app-icon-32x32.png")
    .build_file("app-icon.ico");

Structs§

  • Builds an ICO file from individual files. For each size, the closest source image is scaled down to the appropriate size.
  • A list of icon sizes.

Enums§

Type Aliases§