libwebp

package
v0.0.0-...-75cd0df Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 3, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConvertToNRGBA

func ConvertToNRGBA(src image.Image) *image.NRGBA

func Encode

Encode encodes src into w considering the options in o.

Any src that isn't one of *image.RGBA, *image.NRGBA, or *image.Gray will be converted to *image.NRGBA using draw.Draw first.

Types

type BitstreamFeatures

type BitstreamFeatures struct {
	Width        int
	Height       int
	HasAlpha     bool
	HasAnimation bool
	Format       FormatType
}

type Decoder

type Decoder struct {
	// contains filtered or unexported fields
}

Decoder stores information to decode picture

func NewDecoder

func NewDecoder(r io.Reader, o *webpoptions.DecodingOptions) (d *Decoder, err error)

func (*Decoder) Decode

func (d *Decoder) Decode() (image.Image, error)

Decode picture from reader

func (*Decoder) GetFeatures

func (d *Decoder) GetFeatures() BitstreamFeatures

GetFeatures return information about picture: width, height ...

type Encoder

type Encoder struct {
	// contains filtered or unexported fields
}

type FormatType

type FormatType int
const (
	FormatUndefined FormatType = iota
	FormatLossy
	FormatLossless
)

noinspection GoUnusedConst

type VP8StatusCode

type VP8StatusCode int
const (
	Vp8StatusOk VP8StatusCode = iota
	Vp8StatusOutOfMemory
	Vp8StatusInvalidParam
	Vp8StatusBitstreamError
	Vp8StatusUnsupportedFeature
	Vp8StatusSuspended
	Vp8StatusUserAbort
	Vp8StatusNotEnoughData
)

noinspection GoUnusedConst

func (VP8StatusCode) String

func (c VP8StatusCode) String() (label string)

type Vp8EncStatus

type Vp8EncStatus int
const (
	Vp8EncOk Vp8EncStatus = iota
	Vp8EncErrorOutOfMemory
	Vp8EncErrorBitstreamOutOfMemory
	Vp8EncErrorNullParameter
	Vp8EncErrorInvalidConfiguration
	Vp8EncErrorBadDimension
	Vp8EncErrorPartition0Overflow
	Vp8EncErrorPartitionOverflow
	Vp8EncErrorBadWrite
	Vp8EncErrorFileTooBig
	Vp8EncErrorUserAbort
	Vp8EncErrorLast
)

func (Vp8EncStatus) String

func (c Vp8EncStatus) String() (label string)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL