Package png
Overview ?
Overview ?
Package png implements a PNG image decoder and encoder.
The PNG specification is at http://www.w3.org/TR/PNG/.
Index
- func Decode(r io.Reader) (image.Image, error)
- func DecodeConfig(r io.Reader) (image.Config, error)
- func Encode(w io.Writer, m image.Image) error
- type FormatError
- func (e FormatError) Error() string
- type UnsupportedError
- func (e UnsupportedError) Error() string
Package files
func Decode
func Decode(r io.Reader) (image.Image, error)
Decode reads a PNG image from r and returns it as an image.Image. The type of Image returned depends on the PNG contents.
func DecodeConfig
func DecodeConfig(r io.Reader) (image.Config, error)
DecodeConfig returns the color model and dimensions of a PNG image without decoding the entire image.
func Encode
func Encode(w io.Writer, m image.Image) 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
type FormatError string
A FormatError reports that the input is not a valid PNG.
func (FormatError) Error
func (e FormatError) Error() string
type UnsupportedError
type UnsupportedError string
An UnsupportedError reports that the input uses a valid but unimplemented PNG feature.
func (UnsupportedError) Error
func (e UnsupportedError) Error() string
Build version go1.0.1.
Except as noted, the content of this page is licensed under the Creative Commons Attribution 3.0 License, and code is licensed under a BSD license.
Terms of Service | Privacy Policy
Except as noted, the content of this page is licensed under the Creative Commons Attribution 3.0 License, and code is licensed under a BSD license.
Terms of Service | Privacy Policy