Class ImageFrame
Represents a pixel-agnostic image frame containing all pixel data and ImageFrameMetadata. In case of animated formats like gif, it contains the single frame in a animation. In all other cases it is the only frame of the image.
Inherited Members
Namespace: SixLabors.ImageSharp
Assembly: SixLabors.ImageSharp.dll
Syntax
public abstract class ImageFrame : IConfigurationProvider, IDisposable
Constructors
| Edit this page View SourceImageFrame(Configuration, int, int, ImageFrameMetadata)
Initializes a new instance of the ImageFrame class.
Declaration
protected ImageFrame(Configuration configuration, int width, int height, ImageFrameMetadata metadata)
Parameters
Type | Name | Description |
---|---|---|
Configuration | configuration | The configuration which allows altering default behaviour or extending the library. |
int | width | The frame width. |
int | height | The frame height. |
ImageFrameMetadata | metadata | The ImageFrameMetadata. |
Properties
| Edit this page View SourceConfiguration
Gets the configuration which allows altering default behaviour or extending the library.
Declaration
public Configuration Configuration { get; }
Property Value
Type | Description |
---|---|
Configuration |
Height
Gets the height.
Declaration
public int Height { get; }
Property Value
Type | Description |
---|---|
int |
Metadata
Gets the metadata of the frame.
Declaration
public ImageFrameMetadata Metadata { get; }
Property Value
Type | Description |
---|---|
ImageFrameMetadata |
Width
Gets the width.
Declaration
public int Width { get; }
Property Value
Type | Description |
---|---|
int |
Methods
| Edit this page View SourceBounds()
Gets the bounds of the frame.
Declaration
public Rectangle Bounds()
Returns
Type | Description |
---|---|
Rectangle | The Rectangle |
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
Declaration
public void Dispose()
Dispose(bool)
Disposes the object and frees resources for the Garbage Collector.
Declaration
protected abstract void Dispose(bool disposing)
Parameters
Type | Name | Description |
---|---|---|
bool | disposing | Whether to dispose of managed and unmanaged objects. |
Size()
Gets the size of the frame.
Declaration
public Size Size()
Returns
Type | Description |
---|---|
Size | The Size() |