ppm

package module
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2023 License: MIT Imports: 8 Imported by: 13

README

Package ppm PkgGoDev Go Report Card

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.

The PPM specification is at http://netpbm.sourceforge.net/doc/ppm.html.

func Decode

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

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

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

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

Documentation

Overview

Package ppm implements a Portable Pixel Map (PPM) image decoder and encoder. The supported image color model is color.RGBAModel.

The PPM specification is at http://netpbm.sourceforge.net/doc/ppm.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 PPM 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 PPM 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 PPM format.

Types

This section is empty.

Jump to

Keyboard shortcuts

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