Packages

Render BMP images in Gleam

Current section

Files

Jump to
blimp README.md
Raw

README.md

# blimp
Render BMP images in Gleam
[![Package Version](https://img.shields.io/hexpm/v/blimp)](https://hex.pm/packages/blimp)
[![Hex Docs](https://img.shields.io/badge/hex-docs-ffaff3)](https://hexdocs.pm/blimp/)
```sh
gleam add blimp@1
```
```gleam
import blimp
import simplifile
pub fn main() {
let width = 400
let height = 300
let bmp =
blimp.simple_render(width: width, height:, pixel: fn(x, y) {
let red = 255
let green = x * 255 / width
let blue = y * 255 / height
blimp.rgb(red:, green:, blue:)
})
let assert Ok(_) = simplifile.write_bits("out.bmp", bmp)
}
```
Further documentation can be found at <https://hexdocs.pm/blimp>.