OpenCV for Unity 3.0.0
Enox Software / Please refer to OpenCV official document ( http://docs.opencv.org/4.12.0/index.html ) for the details of the argument of the method.
Loading...
Searching...
No Matches
OpenCVForUnity.ImgcodecsModule.Animation Class Reference

Represents an animation with multiple frames. The Animation struct is designed to store and manage 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. More...

Public Member Functions

 Animation ()
 Constructs an Animation object with optional loop count and background color.
 
 Animation (int loopCount)
 Constructs an Animation object with optional loop count and background color.
 
 Animation (int loopCount, in Vec4d bgColor)
 Constructs an Animation object with optional loop count and background color.
 
 Animation (int loopCount, in(double v0, double v1, double v2, double v3) bgColor)
 Constructs an Animation object with optional loop count and background color.
 
 Animation (int loopCount, Scalar bgColor)
 Constructs an Animation object with optional loop count and background color.
 
Scalar get_bgcolor ()
 
double double double double v3 get_bgcolorAsValueTuple ()
 
Vec4d get_bgcolorAsVec4d ()
 
MatOfInt get_durations ()
 
List< Matget_frames ()
 
int get_loop_count ()
 
Mat get_still_image ()
 
IntPtr getNativeObjAddr ()
 
void set_bgcolor (in Vec4d bgcolor)
 
void set_bgcolor (in(double v0, double v1, double v2, double v3) bgcolor)
 
void set_bgcolor (Scalar bgcolor)
 
void set_durations (MatOfInt durations)
 
void set_frames (List< Mat > frames)
 
void set_loop_count (int loop_count)
 
void set_still_image (Mat still_image)
 
- Public Member Functions inherited from OpenCVForUnity.DisposableObject
void Dispose ()
 
void ThrowIfDisposed ()
 

Static Public Member Functions

static Animation __fromPtr__ (IntPtr addr)
 
- Static Public Member Functions inherited from OpenCVForUnity.DisposableObject
static IntPtr ThrowIfNullIntPtr (IntPtr ptr)
 

Public Attributes

double v0
 
double double v1
 
double double double v2
 

Protected Member Functions

override void Dispose (bool disposing)
 
- Protected Member Functions inherited from OpenCVForUnity.DisposableOpenCVObject
 DisposableOpenCVObject ()
 
 DisposableOpenCVObject (bool isEnabledDispose)
 
 DisposableOpenCVObject (IntPtr ptr)
 
 DisposableOpenCVObject (IntPtr ptr, bool isEnabledDispose)
 
override void Dispose (bool disposing)
 
- Protected Member Functions inherited from OpenCVForUnity.DisposableObject
 DisposableObject ()
 
 DisposableObject (bool isEnabledDispose)
 

Additional Inherited Members

- Package Attributes inherited from OpenCVForUnity.DisposableOpenCVObject
- Properties inherited from OpenCVForUnity.DisposableObject
bool IsDisposed [get, protected set]
 
bool IsEnabledDispose [get, set]
 

Detailed Description

Represents an animation with multiple frames. The Animation struct is designed to store and manage 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.

Constructor & Destructor Documentation

◆ Animation() [1/5]

OpenCVForUnity.ImgcodecsModule.Animation.Animation ( int loopCount,
Scalar bgColor )

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

Parameters
loopCountAn integer representing the number of times the animation should loop:
  • 0 (default) indicates infinite looping, meaning the animation will replay continuously.
  • Positive values denote finite repeat counts, allowing the animation to play a limited number of times.
  • If a negative value or a value beyond the maximum of 0xffff (65535) is provided, it is reset to 0 (infinite looping) to maintain valid bounds.
bgColorA Scalar object representing the background color in BGR format:
  • Defaults to Scalar(), indicating an empty color (usually transparent if supported).
  • This background color provides a solid fill behind frames that have transparency, ensuring a consistent display appearance.

◆ Animation() [2/5]

OpenCVForUnity.ImgcodecsModule.Animation.Animation ( int loopCount)

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

Parameters
loopCountAn integer representing the number of times the animation should loop:
  • 0 (default) indicates infinite looping, meaning the animation will replay continuously.
  • Positive values denote finite repeat counts, allowing the animation to play a limited number of times.
  • If a negative value or a value beyond the maximum of 0xffff (65535) is provided, it is reset to 0 (infinite looping) to maintain valid bounds.
bgColorA Scalar object representing the background color in BGR format:
  • Defaults to Scalar(), indicating an empty color (usually transparent if supported).
  • This background color provides a solid fill behind frames that have transparency, ensuring a consistent display appearance.

◆ Animation() [3/5]

OpenCVForUnity.ImgcodecsModule.Animation.Animation ( )

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

Parameters
loopCountAn integer representing the number of times the animation should loop:
  • 0 (default) indicates infinite looping, meaning the animation will replay continuously.
  • Positive values denote finite repeat counts, allowing the animation to play a limited number of times.
  • If a negative value or a value beyond the maximum of 0xffff (65535) is provided, it is reset to 0 (infinite looping) to maintain valid bounds.
bgColorA Scalar object representing the background color in BGR format:
  • Defaults to Scalar(), indicating an empty color (usually transparent if supported).
  • This background color provides a solid fill behind frames that have transparency, ensuring a consistent display appearance.

◆ Animation() [4/5]

OpenCVForUnity.ImgcodecsModule.Animation.Animation ( int loopCount,
in Vec4d bgColor )

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

Parameters
loopCountAn integer representing the number of times the animation should loop:
  • 0 (default) indicates infinite looping, meaning the animation will replay continuously.
  • Positive values denote finite repeat counts, allowing the animation to play a limited number of times.
  • If a negative value or a value beyond the maximum of 0xffff (65535) is provided, it is reset to 0 (infinite looping) to maintain valid bounds.
bgColorA Scalar object representing the background color in BGR format:
  • Defaults to Scalar(), indicating an empty color (usually transparent if supported).
  • This background color provides a solid fill behind frames that have transparency, ensuring a consistent display appearance.

◆ Animation() [5/5]

OpenCVForUnity.ImgcodecsModule.Animation.Animation ( int loopCount,
in(double v0, double v1, double v2, double v3) bgColor )

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

Parameters
loopCountAn integer representing the number of times the animation should loop:
  • 0 (default) indicates infinite looping, meaning the animation will replay continuously.
  • Positive values denote finite repeat counts, allowing the animation to play a limited number of times.
  • If a negative value or a value beyond the maximum of 0xffff (65535) is provided, it is reset to 0 (infinite looping) to maintain valid bounds.
bgColorA Scalar object representing the background color in BGR format:
  • Defaults to Scalar(), indicating an empty color (usually transparent if supported).
  • This background color provides a solid fill behind frames that have transparency, ensuring a consistent display appearance.

Member Function Documentation

◆ __fromPtr__()

static Animation OpenCVForUnity.ImgcodecsModule.Animation.__fromPtr__ ( IntPtr addr)
static

◆ Dispose()

override void OpenCVForUnity.ImgcodecsModule.Animation.Dispose ( bool disposing)
protectedvirtual

Reimplemented from OpenCVForUnity.DisposableObject.

◆ get_bgcolor()

Scalar OpenCVForUnity.ImgcodecsModule.Animation.get_bgcolor ( )

◆ get_bgcolorAsValueTuple()

double double double double v3 OpenCVForUnity.ImgcodecsModule.Animation.get_bgcolorAsValueTuple ( )

◆ get_bgcolorAsVec4d()

Vec4d OpenCVForUnity.ImgcodecsModule.Animation.get_bgcolorAsVec4d ( )

◆ get_durations()

MatOfInt OpenCVForUnity.ImgcodecsModule.Animation.get_durations ( )

◆ get_frames()

List< Mat > OpenCVForUnity.ImgcodecsModule.Animation.get_frames ( )

◆ get_loop_count()

int OpenCVForUnity.ImgcodecsModule.Animation.get_loop_count ( )

◆ get_still_image()

Mat OpenCVForUnity.ImgcodecsModule.Animation.get_still_image ( )

◆ getNativeObjAddr()

IntPtr OpenCVForUnity.ImgcodecsModule.Animation.getNativeObjAddr ( )

◆ set_bgcolor() [1/3]

void OpenCVForUnity.ImgcodecsModule.Animation.set_bgcolor ( in Vec4d bgcolor)

◆ set_bgcolor() [2/3]

void OpenCVForUnity.ImgcodecsModule.Animation.set_bgcolor ( in(double v0, double v1, double v2, double v3) bgcolor)

◆ set_bgcolor() [3/3]

void OpenCVForUnity.ImgcodecsModule.Animation.set_bgcolor ( Scalar bgcolor)

◆ set_durations()

void OpenCVForUnity.ImgcodecsModule.Animation.set_durations ( MatOfInt durations)

◆ set_frames()

void OpenCVForUnity.ImgcodecsModule.Animation.set_frames ( List< Mat > frames)

◆ set_loop_count()

void OpenCVForUnity.ImgcodecsModule.Animation.set_loop_count ( int loop_count)

◆ set_still_image()

void OpenCVForUnity.ImgcodecsModule.Animation.set_still_image ( Mat still_image)

Member Data Documentation

◆ v0

double OpenCVForUnity.ImgcodecsModule.Animation.v0

◆ v1

double double OpenCVForUnity.ImgcodecsModule.Animation.v1

◆ v2

double double double OpenCVForUnity.ImgcodecsModule.Animation.v2

The documentation for this class was generated from the following files: