Table of Contents

Method ImWriteAnimation

Namespace
OpenCvSharp
Assembly
OpenCvSharp.dll

ImWriteAnimation(string, Animation, int[]?)

Saves an Animation to a specified file in an animated format (e.g., GIF, AVIF, APNG, WEBP).

public static bool ImWriteAnimation(string fileName, Animation animation, int[]? prms = null)

Parameters

fileName string

The name of the file where the animation will be saved. The file extension determines the format.

animation Animation

The Animation containing the frames and metadata to be saved.

prms int[]

Format-specific save parameters encoded as pairs

Returns

bool

true if the animation was successfully saved; false otherwise.