Table of Contents

Class Animation

Namespace
OpenCvSharp
Assembly
OpenCvSharp.dll

Represents an animation with multiple frames. Stores and manages data for animated sequences such as those from animated formats (e.g., GIF, AVIF, APNG, WebP). It provides support for looping, background color settings, frame timing, and frame storage.

public class Animation : CvObject, IDisposable
Inheritance
Animation
Implements
Inherited Members

Constructors

Animation(int, Scalar?)

Constructs an Animation object with optional loop count and background color.

Properties

BgColor

Background color of the animation in BGRA format.

Durations

Duration for each frame in milliseconds.

Frames

Frames of the animation. The getter returns freshly-copied Mat headers that the caller owns and is responsible for disposing.

LoopCount

Number of times the animation should loop. 0 means infinite looping.

StillImage

Image that can be used for the format in addition to the animation, or if animation is not supported in the reader (like in PNG). The getter returns a freshly-copied Mat header that the caller owns and is responsible for disposing.