https://github.com/slashformotion/pbm
Package pbm implements a Portable Bit Map (PBM) image decoder and encoder written in Go
https://github.com/slashformotion/pbm
Last synced: 4 months ago
JSON representation
Package pbm implements a Portable Bit Map (PBM) image decoder and encoder written in Go
- Host: GitHub
- URL: https://github.com/slashformotion/pbm
- Owner: slashformotion
- License: apache-2.0
- Created: 2022-01-01T17:21:41.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2022-02-16T15:02:46.000Z (over 3 years ago)
- Last Synced: 2025-01-05T13:44:02.954Z (5 months ago)
- Language: Go
- Homepage:
- Size: 1.26 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
Awesome Lists containing this project
README
# Package pbm [](https://pkg.go.dev/github.com/slashformotion/pbm) [](https://goreportcard.com/report/github.com/slashformotion/pbm) [](https://github.com/slashformotion/pbm/actions/workflows/test.yml)
```
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](https://pkg.go.dev/image/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.