Skip to content

lpil/netpbm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

netpbm

Render PBM and PGM images in Gleam

Package Version Hex Docs

gleam add netpbm@2
import netpbm
import simplifile

pub fn main() -> Nil {
  let pgm =
    netpbm.simple_render_pgm(width: 510, height: 255, pixel: fn(x, y) {
      // Render a gradiant from top-left to bottom-right
      { x / 2 + y } / 2
    })
  let assert Ok(_) = simplifile.write_bits("out2.pgm", pgm)
}

Further documentation can be found at https://hexdocs.pm/netpbm.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

 
 
 

Languages