image-toolbox-rs

Image Tool Box Written in Rust based on Piston/Image

Build Status

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.

How to use

In Cargo.toml rust [dependencies] image-toolbox = "*"

The histogram struct

```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); ```

turn a TOO bright image into normal colors

```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(); ```

before

Implementation 1

after

Implementation 1