Documentation ¶
Overview ¶
Package png implements a PNG image decoder and encoder.
The PNG specification is at http://www.w3.org/TR/PNG/.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Decode ¶
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 ¶
DecodeConfig returns the color model and dimensions of a PNG image without decoding the entire image.
Types ¶
type CompressionLevel ¶
type CompressionLevel int
const ( DefaultCompression CompressionLevel = 0 NoCompression CompressionLevel = -1 BestSpeed CompressionLevel = -2 BestCompression CompressionLevel = -3 )
type Encoder ¶
type Encoder struct {
CompressionLevel CompressionLevel
}
Encoder configures encoding PNG images.
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
Click to show internal directories.
Click to hide internal directories.