Class AnimatedImage
Represents an animated image that can be displayed in a user interface.
public class AnimatedImage : DisposableObject, IBaseObjectWithAttr, IBaseObjectWithId, INotifyPropertyChanged, IDisposableObject, IDisposable, IBaseObject
- Inheritance
-
AnimatedImage
- Implements
Remarks
This class inherits from DisposableObject, which means it should be properly disposed of to free resources. It is designed to handle the loading and rendering of animated images efficiently.
Constructors
- AnimatedImage(Func<Stream>, bool)
Initializes a new instance of the AnimatedImage class using the specified stream provider and an option to delay frame loading.
- AnimatedImage(Stream)
Initializes a new instance of the AnimatedImage class using the specified stream containing image data.
- AnimatedImage(string, bool)
Initializes a new instance of the AnimatedImage class using the specified image source URL and an option to delay loading of animation frames.
Properties
- AnimationSize
Gets the size of the animation in pixels.
- FrameCount
Gets the number of frames for this animation.
- IsLoaded
Gets a value indicating whether the image frames have been successfully loaded.
- IsOk
Gets a value indicating whether the animated image contains valid frame data and is ready for processing.
- SourceUrl
Gets or sets the URL of the source resource associated with this instance.
Methods
- DisposeManaged()
Override to dispose managed resources. Here we dispose all used object references.
- GetDuration(int)
Gets the duration, in milliseconds, of the frame at the specified index.
- GetFrame(int)
Returns the specified frame as a Image.
- GetFrameInfo(int)
Retrieves information about a specific frame in the animated image.
- RequireFrames()
Ensures that the required frames are available for processing. If frames are already present, the method exits without performing any action.
- ResetFrames()
Clears all frame data and returns the animated image to its initial state.