image-toolbox

Crates.ioimage-toolbox
lib.rsimage-toolbox
version0.1.1
sourcesrc
created_at2019-02-22 19:59:14.359093
updated_at2019-02-22 20:05:52.66052
descriptionSimple and fast Image processing features library built on top of Piston/Image
homepagehttps://github.com/Isan-Rivkin/image-toolbox-rs.git
repositoryhttps://github.com/Isan-Rivkin/image-toolbox-rs.git
max_upload_size
id116614
size100,394
isan_rivkin (Isan-Rivkin)

documentation

README

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

[dependencies]
image-toolbox = "*"

The histogram struct

use image_toolbox::{Histogram, load_img};
use image::{DynamicImage};
 
// load img 
let img = load_img("./test/bright_miami.jpg").unwrap();
let histogram = Histogram::new(&img);
println!("{:?}",histogram);
// get the r,g,b probability of some pixel value 
let (p_r,p_g,p_b) : (f32,f32,f32) = histogram.probability(200);

turn a TOO bright image into normal colors

use image_toolbox::{load_img,normalize_brightness,save_img};
 
let img = load_img("./test/bright_miami.jpg").unwrap();
let new_image = normalize_brightness(&img).unwrap();
save_img(&new_image,"./test/result.jpg").unwrap();

before

Implementation 1

after

Implementation 1

Commit count: 14

cargo fmt