A simple solution for generating .ico
and .icns
icons. This crate serves as IconWriter CLI's internal library.
use iconwriter::prelude::*;
const N_ENTRIES: usize = 1;
fn main() {
let mut icon = Icon::ico(N_ENTRIES);
let src_image = SourceImage::from_path("img.jpg").unwrap();
icon.add_sizes(&vec![32, 64], &src_image).unwrap();
}
Format | Supported? |
PNG | All supported color types |
JPEG | 1seline and progressive |
GIF | Yes |
BMP | Yes |
ICO | Yes |
TIFF | Baseline(no fax support), LZW , PackBits |
WEBP | Lossy(Luma channel only) |
PNM | PBM , PGM , PPM , standard PAM |
SVG | Limited(flat filled shapes only) |
pub extern crate nsvg; |
pub use nsvg::image; |
pub use crate::ico::Ico; |
pub use crate::icns::Icns; |
pub use png_sequence::PngSequence; |