go/src/image/png/reader.go

const ctGrayscale

const ctTrueColor

const ctPaletted

const ctGrayscaleAlpha

const ctTrueColorAlpha

const cbInvalid

const cbG1

const cbG2

const cbG4

const cbG8

const cbGA8

const cbTC8

const cbP1

const cbP2

const cbP4

const cbP8

const cbTCA8

const cbG16

const cbGA16

const cbTC16

const cbTCA16

func cbPaletted(cb int) bool {}

func cbTrueColor(cb int) bool {}

const ftNone

const ftSub

const ftUp

const ftAverage

const ftPaeth

const nFilter

const itNone

const itAdam7

type interlaceScan

var interlacing

const dsStart

const dsSeenIHDR

const dsSeenPLTE

const dsSeentRNS

const dsSeenIDAT

const dsSeenIEND

const pngHeader

type decoder

type FormatError

func (e FormatError) Error() string {}

var chunkOrderError

type UnsupportedError

func (e UnsupportedError) Error() string {}

func (d *decoder) parseIHDR(length uint32) error {}

func (d *decoder) parsePLTE(length uint32) error {}

func (d *decoder) parsetRNS(length uint32) error {}

// Read presents one or more IDAT chunks as one continuous stream (minus the
// intermediate chunk headers and footers). If the PNG data looked like:
//
//	... len0 IDAT xxx crc0 len1 IDAT yy crc1 len2 IEND crc2
//
// then this reader presents xxxyy. For well-formed PNG data, the decoder state
// immediately before the first Read call is that d.r is positioned between the
// first IDAT and xxx, and the decoder state immediately after the last Read
// call is that d.r is positioned between yy and crc1.
func (d *decoder) Read(p []byte) (int, error) {}

// decode decodes the IDAT data into an image.
func (d *decoder) decode() (image.Image, error) {}

// readImagePass reads a single image pass, sized according to the pass number.
func (d *decoder) readImagePass(r io.Reader, pass int, allocateOnly bool) (image.Image, error) {}

// mergePassInto merges a single pass into a full sized image.
func (d *decoder) mergePassInto(dst image.Image, src image.Image, pass int) {}

func (d *decoder) parseIDAT(length uint32) (err error) {}

func (d *decoder) parseIEND(length uint32) error {}

func (d *decoder) parseChunk(configOnly bool) error {}

func (d *decoder) verifyChecksum() error {}

func (d *decoder) checkHeader() 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 Decode(r io.Reader) (image.Image, error) {}

// DecodeConfig returns the color model and dimensions of a PNG image without
// decoding the entire image.
func DecodeConfig(r io.Reader) (image.Config, error) {}

func init() {}