touka 0.3.5

This is a command-line tool for making image backgrounds transparent
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use anyhow::Result;
use clap::Parser;

use touka::{load_image, save_image, transparent, ImageLocation, Opt};

#[tokio::main]
async fn main() -> Result<()> {
    let opt = Opt::parse();

    let img = load_image(ImageLocation::from(opt.input_path)).await?;
    let transparent_img = transparent(img, opt.threshold);
    save_image(transparent_img, ImageLocation::from(opt.output_path)).await?;

    Ok(())
}