go/src/image/gif/reader.go

var errNotEnough

var errTooMuch

var errBadPixel

type reader

const fColorTable

const fInterlace

const fColorTableBitsMask

const gcTransparentColorSet

const gcDisposalMethodMask

const DisposalNone

const DisposalBackground

const DisposalPrevious

const sExtension

const sImageDescriptor

const sTrailer

const eText

const eGraphicControl

const eComment

const eApplication

func readFull(r io.Reader, b []byte) error {}

func readByte(r io.ByteReader) (byte, error) {}

type decoder

type blockReader

func (b *blockReader) fill() {}

func (b *blockReader) ReadByte() (byte, error) {}

// blockReader must implement io.Reader, but its Read shouldn't ever actually
// be called in practice. The compress/lzw package will only call [blockReader.ReadByte].
func (b *blockReader) Read(p []byte) (int, error) {}

// close primarily detects whether or not a block terminator was encountered
// after reading a sequence of data sub-blocks. It allows at most one trailing
// sub-block worth of data. I.e., if some number of bytes exist in one sub-block
// following the end of LZW data, the very next sub-block must be the block
// terminator. If the very end of LZW data happened to fill one sub-block, at
// most one more sub-block of length 1 may exist before the block-terminator.
// These accommodations allow us to support GIFs created by less strict encoders.
// See https://golang.org/issue/16146.
func (b *blockReader) close() error {}

// decode reads a GIF image from r and stores the result in d.
func (d *decoder) decode(r io.Reader, configOnly, keepAllFrames bool) error {}

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

func (d *decoder) readColorTable(fields byte) (color.Palette, error) {}

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

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

func (d *decoder) readImageDescriptor(keepAllFrames bool) error {}

func (d *decoder) newImageFromDescriptor() (*image.Paletted, error) {}

func (d *decoder) readBlock() (int, error) {}

type interlaceScan

var interlacing

// uninterlace rearranges the pixels in m to account for interlaced input.
func uninterlace(m *image.Paletted) {}

// Decode reads a GIF image from r and returns the first embedded
// image as an [image.Image].
func Decode(r io.Reader) (image.Image, error) {}

type GIF

// DecodeAll reads a GIF image from r and returns the sequential frames
// and timing information.
func DecodeAll(r io.Reader) (*GIF, error) {}

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

func init() {}