Crate image_utils [] [src]

A crate to get images info and process them.

Requires ImageMagick installed to function properly since some functions uses its command line tools.

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)?;
let cropped = crop(&path, 10, 10, 100, 100, &Path::new("cropped.jpg"), 5)?;
let resized = resize(&path, 200, 200, &Path::new("resized.jpg"), 5)?;

println!("{:?} {:?} {:?}", inf, cropped, resized);

Structs

Info

info function result

Functions

crop

Crops image, panics if passed coordinates or cropped image size are out of bounds of existing image, fails if timeout exceeded

info

Returns common information about image

resize

Resizes image preserving its aspect ratio, fails if timeout exceeded