https://github.com/dy-tea/vbmp
Create Bitmap files using the V programming language
https://github.com/dy-tea/vbmp
vlang vlang-package
Last synced: 2 months ago
JSON representation
Create Bitmap files using the V programming language
- Host: GitHub
- URL: https://github.com/dy-tea/vbmp
- Owner: dy-tea
- License: gpl-3.0
- Created: 2024-12-15T01:15:59.000Z (6 months ago)
- Default Branch: master
- Last Pushed: 2025-01-10T00:27:57.000Z (5 months ago)
- Last Synced: 2025-02-12T14:22:55.471Z (4 months ago)
- Topics: vlang, vlang-package
- Language: V
- Homepage: https://dy-tea.github.io/vbmp/
- Size: 111 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- trackawesomelist - vbmp (⭐1) - Read and write bitmap files. (Recently Updated / [Dec 22, 2024](/content/2024/12/22/README.md))
- awesome-v - vbmp - Read and write bitmap files. (Libraries / Graphics)
README
# vbmp
Read and write bitmap files with the [V programming language](https://vlang.io).
See the docs [here](https://dy-tea.github.io/vbmp/).### Installation
```
v install dy-tea.vbmp
```### Usage
```v
import vbmpconst width := 1920
const height := 1080fn 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') }
}```