6 releases

0.2.0 Apr 22, 2017
0.1.4 Mar 1, 2017
0.1.3 Feb 25, 2017

#5 in #resize

Download history 6/week @ 2019-08-08 38/week @ 2019-08-22 18/week @ 2019-08-29 21/week @ 2019-09-05 10/week @ 2019-09-12 35/week @ 2019-09-19 13/week @ 2019-09-26 6/week @ 2019-10-03 14/week @ 2019-10-17 8/week @ 2019-10-24 19/week @ 2019-10-31 1/week @ 2019-11-07 7/week @ 2019-11-14

60 downloads per month
Used in 1 crate

MIT license

2MB
138 lines

Image Utils

Image processing utilities

crates.io Build Status

Documentation

https://docs.rs/image-utils/

Functions

Image information

extern crate image_utils;

use std::path::Path;
use image_utils::info;

fn main() {
    let inf = info(&Path::new("test.jpg")).unwrap();
    println!("{:?}", inf);
}

Crop image

extern crate image_utils;

use std::path::Path;
use image_utils::crop;

fn main() {
    crop(&Path::new("test.jpg"), 10, 10, 100, 100, &Path::new("cropped.jpg")).unwrap();
}

Resize image

extern crate image_utils;

use std::path::Path;
use image_utils::resize;

fn main() {
    resize(&Path::new("test.jpg"), 200, 200, &Path::new("resized.jpg")).unwrap();
}

Run tests

cargo test

lib.rs:

A crate to get images info and process them, including animated GIFs.

Example

extern crate image_utils;

use std::path::Path;
use image_utils::{info, crop, resize};

let path = Path::new("test.jpg");

let inf = info(&path)?;
println!("{:?}", inf);

crop(&path, 10, 10, 100, 100, &Path::new("cropped.jpg"))?;
resize(&path, 200, 200, &Path::new("resized.jpg"))?;

Dependencies