Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lmittmann/ppm
Package ppm implements a Portable Pixel Map (PPM) image decoder and encoder written in Go.
https://github.com/lmittmann/ppm
go golang image ppm
Last synced: 3 months ago
JSON representation
Package ppm implements a Portable Pixel Map (PPM) image decoder and encoder written in Go.
- Host: GitHub
- URL: https://github.com/lmittmann/ppm
- Owner: lmittmann
- License: mit
- Created: 2014-04-24T17:59:04.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2023-02-06T08:34:04.000Z (about 2 years ago)
- Last Synced: 2024-10-13T19:12:18.307Z (4 months ago)
- Topics: go, golang, image, ppm
- Language: Go
- Homepage: https://pkg.go.dev/github.com/lmittmann/ppm
- Size: 13.7 KB
- Stars: 22
- Watchers: 3
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Package ppm [![PkgGoDev](https://pkg.go.dev/badge/github.com/lmittmann/ppm)](https://pkg.go.dev/github.com/lmittmann/ppm) [![Go Report Card](https://goreportcard.com/badge/github.com/lmittmann/ppm)](https://goreportcard.com/report/github.com/lmittmann/ppm)
```
import "github.com/lmittmann/ppm"
```
Package ppm implements a Portable Pixel Map (PPM) image decoder and encoder. The supported image color model is [color.RGBAModel](https://pkg.go.dev/image/color#RGBAModel).The PPM specification is at http://netpbm.sourceforge.net/doc/ppm.html.
## func [Decode](reader.go#L28)
func Decode(r io.Reader) (image.Image, error)
Decode reads a PPM image from Reader r and returns it as an image.Image.## func [DecodeConfig](reader.go#L39)
func DecodeConfig(r io.Reader) (image.Config, error)
DecodeConfig returns the color model and dimensions of a PPM image without decoding the entire image.## func [Encode](writer.go#L15)
func Encode(w io.Writer, img image.Image) error
Encode writes the Image img to Writer w in PPM format.