Skip to content

Package pbm implements a Portable Bit Map (PBM) image decoder and encoder written in Go

License

Notifications You must be signed in to change notification settings

slashformotion/pbm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Package pbm PkgGoDev Go Report Card Tests

import "github.com/slashformotion/pbm"

Package pbm implements a Portable Bit Map (PBM) image decoder and encoder. The supported image color model is color.RGBAModel.

The PBM specification is at http://netpbm.sourceforppge.net/doc/pbm.html.

func Decode

func Decode(r io.Reader) (image.Image, error)

Decode reads a PBM image from Reader r and returns it as an image.Image.

func DecodeConfig

func DecodeConfig(r io.Reader) (image.Config, error)

DecodeConfig returns the color model and dimensions of a PBM image without decoding the entire image.

func Encode

func Encode(w io.Writer, img image.Image) error

Encode writes the Image img to Writer w in PBM format.

About

Package pbm implements a Portable Bit Map (PBM) image decoder and encoder written in Go

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages