pamper

Crates.iopamper
lib.rspamper
version0.2.3
sourcesrc
created_at2024-10-28 01:42:21.186437
updated_at2024-11-14 00:26:44.128877
descriptionA very minimal library to save image data to .pam files.
homepage
repositoryhttps://github.com/odwngit/pamper
max_upload_size
id1425186
size4,654
odwn (odwngit)

documentation

README

pamper

A super simple rust library to write image data to .pam (Portable Arbitrary Map) files.
This is very rudimentary, with no support for some features of .pam such as black and white tuple types (and even maxval is always set to 255).
But, this is suitable for my purposes.

Usage

Example usage:

use pamper::save_pam;

fn main() {
    let data: Vec<u8> = vec![
        255, 0, 0,
        0, 255, 0,
        0, 0, 255
    ];

    save_pam("output.pam", 3, 1, 3, false, data);
}
Commit count: 15

cargo fmt