vbmp
fn new #
fn new(width int, height int) Bitmap
create a new bitmap
fn read #
fn read(path string) !Bitmap
load bitmap from file
struct Bitmap #
struct Bitmap {
width int
height int
mut:
pixels []u8
}
fn (Bitmap) set_pixel #
fn (mut bp Bitmap) set_pixel(x u32, y u32, r u8, g u8, b u8) !
set a pixel of the bitmap to a given color
fn (Bitmap) write #
fn (bp Bitmap) write(path string) !
write bitmap to file