Skip to main content

Module codec

Module codec 

Source
Expand description

Thin glue over the codec public API, shared by every binary.

Both decode and encode route through the umbrella webpkit crate: decode inspects the container and handles either VP8L (lossless) or VP8 (lossy) input, and a single EncodeMode selects the encoder.

Enums§

EncodeMode
Which codec (and its knobs) encode should use.

Functions§

decode
Decode any still WebP file — lossless (VP8L) or lossy (VP8 ) — into an Image with the requested output layout, dispatching on the container.
encode
Encode an Image into a complete WebP file — lossless or lossy per mode — embedding exactly the given metadata (an empty Metadata yields a bare VP8L/VP8 file).