Image Tool Box Written in Rust based on Piston/Image
Quick to start, different and random Image operations. WIP, many more features to be added.
Feel free to contribute and add new features via a Pull Request.
In Cargo.toml
rust
[dependencies]
image-toolbox = "*"
```rust use imagetoolbox::{Histogram, loadimg}; use image::{DynamicImage};
// load img let img = loadimg("./test/brightmiami.jpg").unwrap(); let histogram = Histogram::new(&img); println!("{:?}",histogram); // get the r,g,b probability of some pixel value let (pr,pg,p_b) : (f32,f32,f32) = histogram.probability(200); ```
```rust use imagetoolbox::{loadimg,normalizebrightness,saveimg};
let img = loadimg("./test/brightmiami.jpg").unwrap(); let newimage = normalizebrightness(&img).unwrap(); save_img(&img,"./test/result.jpg").unwrap(); ```