Skip to content

dy-tea/vbmp

Repository files navigation

vbmp

Read and write bitmap files with the V programming language.

Installation

v install https://github.com/dy-tea/vbmp.git

Usage

import vbmp

const width := 1920
const height := 1080

fn main() {
    mut bitmap := vbmp.new(width, height)

    for i in 0..width {
        for j in 0..height {
            bitmap.set_pixel(i, j, 255, 0, 0) or { panic('pixel is out of bounds of image') }
        }
    }

    bitmap.write('out.bmp') or { panic('could not write file') }
}

About

Create Bitmap files using the V programming language

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages