Convert an image to a favicon with the size 32x32
Quality checks:
Testing and building installers at GitHub Actions
Unit test code coverage at Codecov
Code quality measurement at Codacy
Code smells at Sonarcloud (which does not support Rust)
It was sometimes challenging to get the favicon size right, so I made this.
The generated favicon.ico (or any other .ico output file name you choose) is a square, 32 pixels in both width and height.
The input image file support depends on the set of features set in Cargo.toml and thus some additional libraries need to be available when compiling the application.
More details at image-rs crates supported image formats documentation.
The name of the project (chinenshichanaka, 知念志喜屋仲) is for honoring the legacy of a certain master from the Ryukyu archipelago, Japan, who contributed to the martial arts that we today know as karate and ryukyu kobujutsu.
Read more about why these martial arts are important to the creator of this tool at karatejukka.fi.
Assuming Rust has been installed, and the cargo that comes with Rust, is available:
cargo install chinenshichanakaAfter installation and having the executable available in the PATH variable, the input image file is
specified as the first argument, and the output icon file optionally as the second argument:
chinenshichanaka "image of okapi.png" "favicon.ico"Now there should be the resulting favicon.ico file in the current folder.
The file can be checked, for example, with GraphicsMagick:
gm identify favicon.ico
# favicon.ico=> ICO 32x32+0+0 DirectClass 8-bit 1.7Ki 0.000u 0m:0.000001s