pbm

pbm is PBM(Portable bitmap) image encoder/decorder module.

PBM example

P1
# comment
5 6
0 0 1 0 0
0 1 1 0 0
0 0 1 0 0
0 0 1 0 0
0 0 1 0 0
1 1 1 1 1

See also:

Types

PBMValue = enum
  white = 0'u8, black
PBM = ref PBMObj

Consts

fileDiscriptor = "P1"

Procs

proc encode(data: seq[seq[PBMValue]]): PBM {...}{.raises: [], tags: [].}
proc format(self: PBM): string {...}{.raises: [], tags: [].}
proc decode(s: string): PBM {...}{.raises: [OverflowError, ValueError], tags: [].}
proc decode(f: File): PBM {...}{.raises: [OverflowError, ValueError, IOError],
                        tags: [ReadIOEffect].}
proc `$`(self: PBM): string {...}{.raises: [], tags: [].}