Photo
Utility image classes for Rust.
Features
- Grayscale, Grascale with alpha, RGB and RGBA images, as well as custom color types.
- Colour maps
- Image IO
- Image transformations utilities.
- Tile manipulation.
- Generic precision types for image components:
u8,f32,f64etc. - Print images to the console.
Usage
Reading and writing images
Loading a RGB image with f32 components:
use ImageRGB;
let mut image = load.expect;
Save it:
image.save.expect;
Image transformations
image.flip_horizontal;
image.rotate_clockwise;
Tiling
let tile_size = ; // 14x14 pixel tiles
let tiles: = image.tiles;
Colour maps
let colours = vec!;
let colour_map: = new;
let sample = colour_map.sample;
Colourize grayscale images
use ImageG;
let grayscale_image = load.expect;
let coloured_image = grayscale_image.colourize;
Print images to the console
println!;