Table of Contents

Method ImEncodeAnimation

Namespace
OpenCvSharp
Assembly
OpenCvSharp.dll

ImEncodeAnimation(string, Animation, out byte[], int[]?)

Encodes an Animation into a memory buffer in an animated format (e.g., GIF, AVIF, APNG, WEBP).

public static bool ImEncodeAnimation(string ext, Animation animation, out byte[] buf, int[]? prms = null)

Parameters

ext string

The file extension that determines the format of the encoded data.

animation Animation

The Animation containing the frames and metadata to be encoded.

buf byte[]

The buffer where the encoded data will be stored.

prms int[]

Format-specific save parameters encoded as pairs

Returns

bool

true if the animation was successfully encoded; false otherwise.