Raster is an image processing lib for Rust.

It provides a simplified API for processing raster images (JPEG, PNG and GIF).

Add this to your Cargo.toml file:

[ dependencies ] raster = "x.x.x"

Where x are version numbers of the latest version of raster. Eg.: 0.1.0

Then add the raster crate in your main.rs:

extern crate raster ;

let image = raster :: open ( "tests/in/sample.png" ). unwrap ();

Raster will detect the image format based on the file name.

use raster :: Image ; let image = Image :: blank ( 150 , 100 );

Save the opened image file:

let image = raster :: open ( "tests/in/sample.png" ). unwrap (); raster :: save ( & image , "tests/out/test_open_save.png" ). unwrap ();

Here are two images blended using the normal mode.

More blending modes and options are available, see the blend API.

An example of images resized to "fit" in a 200x200 box.

More modes available, see the resize API.

Images can be rotated both clockwise and counter-clockwise at any arbitrary angle with a custom background color.

More options are available, checkout the modules below.