Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Encode ¶
func Encode(w io.Writer, src image.Image, o webpoptions.EncodingOptions) error
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) GetFeatures ¶
func (d *Decoder) GetFeatures() BitstreamFeatures
GetFeatures return information about picture: width, height ...
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)
Click to show internal directories.
Click to hide internal directories.