Skip to main content

Module encode

Module encode 

Source
Expand description

Encodes animated thumbnails.

A picture that carries a frame sequence can answer a request for an animated thumbnail with the frames themselves rather than one of them. The three containers MSC2705 names each hold a sequence differently, so each has its own decoder here, and all of them produce a GIF, which is the one animated format this build can encode.

The caps that bound the work live here rather than at either call site, so a source reaches no decoder before what it would cost is known.

StructsΒ§

Output πŸ”’

ConstantsΒ§

ANIMATED_NAME πŸ”’
GIF_SPEED πŸ”’
Quantization effort the GIF encoder spends per frame.

FunctionsΒ§

canvas_pixels πŸ”’
Pixels one composited frame of this source occupies.
decoder_limits πŸ”’
Creates decoder limits from the configured pixel budget.
encode_frames πŸ”’
Encode a picture’s frames as a GIF scaled to these dimensions.
encode_sequence πŸ”’
Encodes a bounded frame sequence into one GIF buffer.
gif_frames πŸ”’
Builds a bounded GIF frame iterator.
png_frames πŸ”’
Builds a bounded APNG frame iterator.
source_frames πŸ”’
The frame sequence a picture carries, and what one frame of it costs.
webp_frames πŸ”’
Builds a bounded WebP frame iterator.