neobmp

Crates.ioneobmp
lib.rsneobmp
version0.2.0
sourcesrc
created_at2022-12-24 00:30:27.01762
updated_at2022-12-25 02:50:56.725586
descriptionA new library to simplify the creation and modification of .BMP files
homepage
repositoryhttps://github.com/CodeWolf33/neobmp
max_upload_size
id744781
size7,524
Mario Olcina Conejos (CodeWolf33)

documentation

README

NEOBMP

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"
Commit count: 0

cargo fmt