Skip to main content

Crate otf_pixels_codec_webp

Crate otf_pixels_codec_webp 

Source
Expand description

WebP codec for otf-pixels, lossy and lossless, owned outright (ADR-0014).

§Layers

The RIFF container (riff); VP8L lossless decode (vp8l) and encode (vp8l_encode); VP8 lossy decode and encode (vp8); ALPH alpha (alpha); and libwebp’s YUV/RGB conversions (yuv). Decoding matches libwebp exactly, and libwebp checks every file we write.

§Memory

Internally buffered in both directions, as SPEC §Formats says. The decoder holds the whole file, whose chunks may come in any order the container allows; both encoders make decisions over the whole picture before the first byte is final.

Modules§

vp8l
VP8L, the WebP lossless bitstream (RFC 9649 §3).

Structs§

WebPCodec
The WebP entry in a sniffing registry.
WebPDecoder
Decodes a WebP stream.
WebPEncoder
Encodes a WebP stream.

Constants§

SIGNATURE_RIFF
The bytes a WebP file begins with: RIFF, four length bytes, then WEBP.
SIGNATURE_WEBP
The form type at offset 8.

Functions§

probe
Whether prefix starts with a WebP signature.