#pam #save #save-pam

pamper

A very minimal library to save image data to .pam files

5 releases

new 0.2.3 Nov 14, 2024
0.2.2 Oct 28, 2024
0.2.1 Oct 28, 2024
0.2.0 Oct 28, 2024
0.1.0 Oct 28, 2024

#5 in #pam

Download history 342/week @ 2024-10-26 29/week @ 2024-11-02

371 downloads per month

0BSD license

4KB
64 lines

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);
}

No runtime deps