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 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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
⌂ 换网址