Package png
import "image/png"
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
Package files
reader.go writer.gofunc 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.
type FormatError
A FormatError reports that the input is not a valid PNG.
type FormatError string
func (FormatError) String
func (e FormatError) String() string
type IDATDecodingError
An IDATDecodingError wraps an inner error (such as a ZLIB decoding error) encountered while processing an IDAT chunk.
type IDATDecodingError struct {
Err os.Error
}
func (IDATDecodingError) String
func (e IDATDecodingError) String() string
type UnsupportedError
An UnsupportedError reports that the input uses a valid but unimplemented PNG feature.
type UnsupportedError string
func (UnsupportedError) String
func (e UnsupportedError) String() string
