ImageFrameCollection Class

The read-only, ordered list of the displayed frames of an Image. Never empty.

public abstract class ImageFrameCollection : IEnumerable<ImageFrame>, IReadOnlyCollection<ImageFrame>, IReadOnlyList<ImageFrame>, IEnumerable

Remarks

The collection is a live view: it reflects structural edits made through the owning image (Image.AppendFrame, Image.RemoveFrame, ...). Structural edits invalidate enumerators, which then throw an InvalidOperationException.

Implements

Nested types

NameDescription
ImageFrameCollection.EnumeratorEnumerates the frames of an ImageFrameCollection.

Properties

NameDescription
CountGets the number of displayed frames. Always at least 1.

Count

Gets the number of displayed frames. Always at least 1.

public abstract int Count { get; }

Property value

int

Indexers

NameDescription
this[int]Gets the frame at the specified index.

this[int]

Gets the frame at the specified index.

public abstract ImageFrame this[int index] { get; }

Parameters

index int
The index of the frame.

Property value

ImageFrame

Exceptions

ArgumentOutOfRangeException
index is out of range.

Methods

NameDescription
Contains(ImageFrame)Determines whether a frame is a displayed frame of this image.
GetEnumerator()Returns an enumerator over the frames.
IndexOf(ImageFrame)Returns the index of a frame in this collection.
System.Collections.Generic.IEnumerable<Meziantou.Framework.Imaging.ImageFrame>.GetEnumerator()
System.Collections.IEnumerable.GetEnumerator()

Contains(ImageFrame)

ImageFrameCollection.cs

Determines whether a frame is a displayed frame of this image.

public bool Contains(ImageFrame frame)

Parameters

frame ImageFrame
The frame to locate.

Returns

bool true if the frame belongs to this collection; otherwise false.

Returns an enumerator over the frames.

public ImageFrameCollection.Enumerator GetEnumerator()

Returns

ImageFrameCollection.Enumerator An enumerator that throws if the collection is structurally modified during enumeration.

IndexOf(ImageFrame)

ImageFrameCollection.cs

Returns the index of a frame in this collection.

public int IndexOf(ImageFrame frame)

Parameters

frame ImageFrame
The frame to locate.

Returns

int The index of the frame, or -1 if it is not a displayed frame of this image (for example the poster frame).

System.Collections.Generic.IEnumerable<Meziantou.Framework.Imaging.ImageFrame>.GetEnumerator()

ImageFrameCollection.cs

No documentation is available.

System.Collections.IEnumerable.GetEnumerator()

ImageFrameCollection.cs
IEnumerator IEnumerable.GetEnumerator()

No documentation is available.