arko 0.2.4

A small library for pixel manipulation in images
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use crate::validator;

pub struct IO<'a> {
    pub in_img: image::DynamicImage,
    pub out_img: &'a str
}

pub fn build_io<'a>(in_path: &'a str, out_path: &'a str, force_ouput_overwrite: bool) -> IO<'a> {
    validator::files_presence(in_path, out_path, force_ouput_overwrite);
    let img = image::open(in_path).unwrap();
    IO {
        in_img: img,
        out_img: out_path,
    }
}