png

package
v0.0.0-...-90c9d3a Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2010 License: BSD-3-Clause, GooglePatentClause Imports: 8 Imported by: 0

Documentation

Overview

The png package implements a PNG image decoder and encoder.

The PNG specification is at http://www.libpng.org/pub/png/spec/1.2/PNG-Contents.html

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Decode

func Decode(r io.Reader) (image.Image, os.Error)

Decode reads a PNG formatted image from r and returns it as an image.Image. The type of Image returned depends on the PNG contents.

func Encode

func Encode(w io.Writer, m image.Image) os.Error

Encode writes the Image m to w in PNG format. Any Image may be encoded, but images that are not image.NRGBA might be encoded lossily.

Types

type FormatError

type FormatError string

A FormatError reports that the input is not a valid PNG.

func (FormatError) String

func (e FormatError) String() string

type IDATDecodingError

type IDATDecodingError struct {
	Err os.Error
}

An IDATDecodingError wraps an inner error (such as a ZLIB decoding error) encountered while processing an IDAT chunk.

func (IDATDecodingError) String

func (e IDATDecodingError) String() string

type UnsupportedError

type UnsupportedError string

An UnsupportedError reports that the input uses a valid but unimplemented PNG feature.

func (UnsupportedError) String

func (e UnsupportedError) String() string

Jump to

Keyboard shortcuts

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