zero4rs 2.0.0

zero4rs is a powerful, pragmatic, and extremely fast web framework for Rust
Documentation
use image::imageops::FilterType;
use image::ImageFormat;

// https://docs.rs/image/0.24.7/image/imageops/enum.FilterType.html
pub fn gif(width: u32, height: u32, destination: &std::path::PathBuf) -> std::path::PathBuf {
    let destination_resize = destination.parent().unwrap().join(format!(
        "{}-{}x{}.gif",
        crate::commons::file_stem(destination.file_name().unwrap().to_str().unwrap()),
        width,
        height
    ));

    let _resizing: image::DynamicImage = image::open(destination).unwrap();

    _resizing
        .resize_exact(width, height, FilterType::Nearest)
        .save_with_format(&destination_resize, ImageFormat::Gif)
        .unwrap();

    destination_resize
}