Crates.io | pamper |
lib.rs | pamper |
version | 0.2.3 |
source | src |
created_at | 2024-10-28 01:42:21.186437 |
updated_at | 2024-11-14 00:26:44.128877 |
description | A very minimal library to save image data to .pam files. |
homepage | |
repository | https://github.com/odwngit/pamper |
max_upload_size | |
id | 1425186 |
size | 4,654 |
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.
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);
}