netpbm
Types
pub type BlackOrWhite {
Black
White
}
Constructors
-
Black -
White
Values
pub fn render_pbm(
width width: Int,
height height: Int,
state state: state,
pixel plot: fn(state, Int, Int) -> #(state, BlackOrWhite),
) -> #(state, BitArray)
Build a PBM image by iterating over each pixel with some state.
The callback gets the X and Y position of the pixel, where 0,0 is top-left.
Rendering starts at the top and goes over each row, left to right, top to bottom.
pub fn render_pgm(
width width: Int,
height height: Int,
state state: state,
pixel plot: fn(state, Int, Int) -> #(state, Int),
) -> #(state, BitArray)
Build a PGM image by iterating over each pixel with some state.
0 is black, 255 is white. Values outside this range are truncated.
The callback gets the X and Y position of the pixel, where 0,0 is top-left.
Rendering starts at the top and goes over each row, left to right, top to bottom.
pub fn simple_render_pbm(
width width: Int,
height height: Int,
pixel plot: fn(Int, Int) -> BlackOrWhite,
) -> BitArray
Build a PBM image by iterating over each pixel.
The callback gets the X and Y position of the pixel, where 0,0 is top-left.
Rendering starts at the top and goes over each row, left to right, top to bottom.
pub fn simple_render_pgm(
width width: Int,
height height: Int,
pixel plot: fn(Int, Int) -> Int,
) -> BitArray
Build a PGM image by iterating over each pixel.
0 is black, 255 is white. Values outside this range are truncated.
The callback gets the X and Y position of the pixel, where 0,0 is top-left.
Rendering starts at the top and goes over each row, left to right, top to bottom.