Skip to main content

Module thumbnail

Module thumbnail 

Source
Expand description

Thumbnail and preview image generation.

This module provides configuration structures and utilities for generating thumbnail images or sprite sheets from video content. Actual pixel decoding is handled by the caller; this module focuses on timestamp selection, sizing, and nearest-neighbour scaling.

Structs§

AnimatedFrame
A single frame in an animated thumbnail.
AnimatedThumbnail
An animated thumbnail consisting of multiple frames with timing.
SpriteSheet
A sprite sheet: a single wide RGBA image that tiles multiple thumbnails left-to-right, top-to-bottom.
SpriteSheetConfig
Configuration for generating a sprite sheet from a video.
Thumbnail
A single generated thumbnail.
ThumbnailConfig
Configuration for thumbnail generation.
ThumbnailExtConfig
Extended thumbnail configuration with quality profile support.

Enums§

ThumbnailFormat
Output format for generated thumbnails.
ThumbnailQualityProfile
Quality profile for thumbnail generation.
ThumbnailStrategy
Strategy for selecting thumbnail timestamps.

Functions§

compute_thumbnail_timestamps
Computes a list of timestamps (in milliseconds) at which to capture thumbnails.
compute_uniform_timestamps
Computes count uniformly spaced timestamps across duration_ms.
format_vtt_time
Formats a millisecond timestamp as a WebVTT time string (HH:MM:SS.mmm).
generate_vtt_track
Generates a WebVTT thumbnail track file from a sprite sheet and its URL.
scale_thumbnail
Scales a source image buffer to the destination dimensions using nearest-neighbour sampling.
select_smart_thumbnails
Selects the count most visually interesting thumbnails from a set, ranked by spatial luminance variance.
thumbnail_variance
Computes the spatial variance of an RGBA thumbnail’s luminance.