Table of Contents

Class ImageFrame

Namespace
SixLabors.ImageSharp
Assembly
SixLabors.ImageSharp.dll

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.

public abstract class ImageFrame : IConfigurationProvider, IDisposable
Inheritance
ImageFrame
Implements
Derived
Inherited Members
Extension Methods

Constructors

ImageFrame(Configuration, int, int, ImageFrameMetadata)

Initializes a new instance of the ImageFrame class.

protected ImageFrame(Configuration configuration, int width, int height, ImageFrameMetadata metadata)

Parameters

configuration Configuration

The configuration which allows altering default behaviour or extending the library.

width int

The frame width.

height int

The frame height.

metadata ImageFrameMetadata

The ImageFrameMetadata.

Properties

Bounds

Gets the bounds of the frame.

public Rectangle Bounds { get; }

Property Value

Rectangle

The Rectangle

Configuration

Gets the configuration which allows altering default behaviour or extending the library.

public Configuration Configuration { get; }

Property Value

Configuration

Height

Gets the frame height in px units.

public int Height { get; }

Property Value

int

Metadata

Gets the metadata of the frame.

public ImageFrameMetadata Metadata { get; }

Property Value

ImageFrameMetadata

Size

Gets the size of the frame.

public Size Size { get; }

Property Value

Size

Width

Gets the frame width in px units.

public int Width { get; }

Property Value

int

Methods

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

public void Dispose()

Dispose(bool)

Disposes the object and frees resources for the Garbage Collector.

protected abstract void Dispose(bool disposing)

Parameters

disposing bool

Whether to dispose of managed and unmanaged objects.

UpdateMetadata(ImageFrameMetadata)

Updates the metadata of the image frame after mutation.

protected void UpdateMetadata(ImageFrameMetadata metadata)

Parameters

metadata ImageFrameMetadata

The Metadata.

UpdateSize(Size)

Updates the size of the image frame after mutation.

protected void UpdateSize(Size size)

Parameters

size Size

The Size.