pbm

package module
v1.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 16, 2022 License: Apache-2.0 Imports: 9 Imported by: 0

README

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.

Documentation

Overview

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.sourceforge.net/doc/pbm.html.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

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 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.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL