tinyppm 0.1.1

Tiny ppm loading library. This is actually the simpliest piece of code one can image that is functional and capable of loading images saved in .ppm format. Due to its simplicity it handles only 'raw ppm' files (i.e. those with 'P6' as their magic number in header' The other thing worth noting is that it is restricted to 24bit images (3 channels, 8bpp each).
Documentation

tinyppm

Simple .ppm loader written in Rust.

This is more of a toy project, I have written, to be able to easy reuse it for some of my experiments with 2d graphhics in Rust.

Usage

  1. Add tinyppm to your Cargo.toml
  2. Call get_image_data:
extern crate tinyppm;

// some code

fn my_function(filename: String) -> {
    let (width, height, image) = tinyppm:ppm_loader::get_image_data(filename);
    // rest of the code
}

// some more code

License

This code is released under the MIT license.