Crates.io | neobmp |
lib.rs | neobmp |
version | 0.2.0 |
source | src |
created_at | 2022-12-24 00:30:27.01762 |
updated_at | 2022-12-25 02:50:56.725586 |
description | A new library to simplify the creation and modification of .BMP files |
homepage | |
repository | https://github.com/CodeWolf33/neobmp |
max_upload_size | |
id | 744781 |
size | 7,524 |
NeoBmp is a library to simplify operations with the .bmp
file format.
This crate includes the following:
- Structures to build your own BMP image.
- A generic `BmpImg` struct to create them all automatically and group them.
- Helpers to serialize all the structs AND the whole image .to_bytes()
- Helpers to write to a file and read from a file
Example usage:
use neobmp::BmpImg;
fn main() {
let mut bmp_img = BmpImg::new(16, 16);
bmp_img.fill_image(255, 0, 125);
bmp_img.write_to_file("something.bmp");
let mut another_bmp = BmpImg::from_file("something.bmp");
}
Add this to your Cargo.toml
[dependencies]
neobmp = "0.2.0"