Table of Contents

Method ImReadAnimation

Namespace
OpenCvSharp
Assembly
OpenCvSharp.dll

ImReadAnimation(string, Animation, int, int)

Loads frames from an animated image file (e.g., GIF, AVIF, APNG, WEBP) into the provided Animation object.

public static bool ImReadAnimation(string filename, Animation animation, int start = 0, int count = 32767)

Parameters

filename string

A string containing the path to the file.

animation Animation

The Animation object where the loaded frames will be stored.

start int

The index of the first frame to load. Defaults to 0.

count int

The number of frames to load. Defaults to 32767.

Returns

bool

true if the file was successfully loaded and frames were extracted; false otherwise.