1 unstable release
0.1.0 | Dec 24, 2024 |
---|
#149 in Images
120 downloads per month
64KB
389 lines
chinenshichanaka (知念志喜屋仲)
Convert an image to a favicon with the size 32x32
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 need to be available when compiling the application. More details at https://github.com/image-rs/image?tab=readme-ov-file#supported-image-formats
Background for the project name
The name of the project (chinenshichanaka, 知念志喜屋仲) is for honouring 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 for me at karatejukka.fi
.
Installation
cargo install chinenshichanaka
Usage
After 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
License
Dependencies
~4.5MB
~85K SLoC