Documentation ¶
Overview ¶
Package webp implements an WEBP image decoder based on libwebp compiled to WASM.
Index ¶
Constants ¶
View Source
const DefaultMethod = 4
DefaultMethod is the default method encoding parameter.
View Source
const DefaultQuality = 75
DefaultQuality is the default quality encoding parameter.
Variables ¶
View Source
var ( ErrMemRead = errors.New("webp: mem read failed") ErrMemWrite = errors.New("webp: mem write failed") ErrDecode = errors.New("webp: decode failed") ErrEncode = errors.New("webp: encode failed") )
Errors .
Functions ¶
func DecodeConfig ¶
DecodeConfig returns the color model and dimensions of a WEBP image without decoding the entire image.
func Dynamic ¶ added in v0.2.2
func Dynamic() error
Dynamic returns error (if there was any) during opening dynamic/shared library.
Types ¶
type Options ¶ added in v0.2.4
type Options struct { // Quality in the range [0,100]. Quality of 100 implies Lossless. Default is 75. Quality int // Lossless indicates whether to use the lossless compression. Lossless will ignore quality. Lossless bool // Method is quality/speed trade-off (0=fast, 6=slower-better). Default is 4. Method int // Exact preserve the exact RGB values in transparent area. Exact bool }
Options are the encoding parameters.
Click to show internal directories.
Click to hide internal directories.