Table of Contents

Method ImCount

Namespace
OpenCvSharp
Assembly
OpenCvSharp.dll

ImCount(string, ImreadModes)

Returns the number of images inside the given file. The function returns the number of pages in a multi-page image (e.g. TIFF), the number of frames in an animation (e.g. AVIF), and 1 otherwise. If the image cannot be decoded, 0 is returned.

public static long ImCount(string filename, ImreadModes flags = ImreadModes.Color)

Parameters

filename string

Name of file to be loaded.

flags ImreadModes

Flag that can take values of @ref cv::ImreadModes, default with IMREAD_COLOR.

Returns

long