Expand description
Still images from video frames: the image-encoding feature.
ImageOptions selects PNG, JPEG, lossless or lossy WebP, plus color,
alpha, bit depth and reduction settings. Every VideoSource
exposes encode_image, encode_image_to and encode_image_data_url.
ImageWorkspace reuses conversion storage across repeated encodes.
Encoding validates the frame and options before writing output. By default,
YUV input uses the matrix in readable ndi_color_info, or BT.709 limited
range when untagged. The SDK’s own YUV-to-RGB conversion always uses BT.709
limited range, ignoring that tag. RGB-received frames already carry that
conversion. The tag still controls color admission and a PNG’s cICP chunk.
Receive YUV when its tagged matrix or original HDR code values matter; see
the color and HDR guidance on ImageOptions.
Structs§
- Image
Options - How a video frame is encoded as a still image: its format, color handling, bit depth, alpha, HDR policy, size and codec effort.
- Image
Workspace - Reusable conversion storage for still-image encoding.
Enums§
- Alpha
Mode - Whether a PNG or WebP image has an alpha channel.
- Color
Policy - How YUV frames are converted to RGB.
- Downscale
- How much an image is reduced in each direction.
- HdrPolicy
- What happens to a frame whose
ndi_color_infogives the PQ or HLG transfer function. Frames with BT.2020 primaries or either HDR transfer need a color tag, which the encoder can write only in PNG. - Image
Format - The image format a video frame is encoded to.
- PngCompression
- How hard PNG compresses.
- Sample
Depth - The bits a channel of an encoded image.
- YuvRange
- The range of a YUV frame’s code values.