#image #utils #resize #gif #crop

image-utils

Image processing utilities

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 9/week @ 2019-03-19 77/week @ 2019-03-26 11/week @ 2019-04-02 4/week @ 2019-04-09 7/week @ 2019-04-23 3/week @ 2019-04-30 14/week @ 2019-05-07 10/week @ 2019-05-14 14/week @ 2019-05-21 22/week @ 2019-05-28 13/week @ 2019-06-04 6/week @ 2019-06-11 19/week @ 2019-06-18 42/week @ 2019-06-25

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