Table of Contents

Class GifFrameMetadata

Namespace
SixLabors.ImageSharp.Formats.Gif
Assembly
SixLabors.ImageSharp.dll

Provides Gif specific metadata information for the image frame.

public class GifFrameMetadata : IFormatFrameMetadata<GifFrameMetadata>, IFormatFrameMetadata, IDeepCloneable, IDeepCloneable<GifFrameMetadata>
Inheritance
GifFrameMetadata
Implements
Inherited Members

Constructors

GifFrameMetadata()

Initializes a new instance of the GifFrameMetadata class.

public GifFrameMetadata()

Properties

ColorTableMode

Gets or sets the color table mode.

public FrameColorTableMode ColorTableMode { get; set; }

Property Value

FrameColorTableMode

DisposalMode

Gets or sets the disposal method for animated images. Primarily used in Gif animation, this field indicates the way in which the graphic is to be treated after being displayed.

public FrameDisposalMode DisposalMode { get; set; }

Property Value

FrameDisposalMode

FrameDelay

Gets or sets the frame delay for animated images. If not 0, when utilized in Gif animation, this field specifies the number of hundredths (1/100) of a second to wait before continuing with the processing of the Data Stream. The clock starts ticking immediately after the graphic is rendered.

public int FrameDelay { get; set; }

Property Value

int

HasTransparency

Gets or sets a value indicating whether the frame has transparency

public bool HasTransparency { get; set; }

Property Value

bool

LocalColorTable

Gets or sets the local color table, if any. The underlying pixel format is represented by Rgb24.

public ReadOnlyMemory<Color>? LocalColorTable { get; set; }

Property Value

ReadOnlyMemory<Color>?

TransparencyIndex

Gets or sets the transparency index. When HasTransparency is set to true this value indicates the index within the color palette at which the transparent color is located.

public byte TransparencyIndex { get; set; }

Property Value

byte

Methods

AfterFrameApply<TPixel>(ImageFrame<TPixel>, ImageFrame<TPixel>, Matrix4x4)

This method is called after a process has been applied to the image frame.

public void AfterFrameApply<TPixel>(ImageFrame<TPixel> source, ImageFrame<TPixel> destination, Matrix4x4 matrix) where TPixel : unmanaged, IPixel<TPixel>

Parameters

source ImageFrame<TPixel>

The source image frame.

destination ImageFrame<TPixel>

The destination image frame.

matrix Matrix4x4

The transformation matrix applied to the image frame.

Type Parameters

TPixel

The type of pixel format.

DeepClone()

Creates a new GifFrameMetadata that is a deep copy of the current instance.

public GifFrameMetadata DeepClone()

Returns

GifFrameMetadata

The GifFrameMetadata.

FromFormatConnectingFrameMetadata(FormatConnectingFrameMetadata)

Creates a new instance of the GifFrameMetadata class from the given FormatConnectingFrameMetadata.

public static GifFrameMetadata FromFormatConnectingFrameMetadata(FormatConnectingFrameMetadata metadata)

Parameters

metadata FormatConnectingFrameMetadata

The FormatConnectingFrameMetadata.

Returns

GifFrameMetadata

The GifFrameMetadata.

ToFormatConnectingFrameMetadata()

Converts the metadata to a FormatConnectingFrameMetadata instance.

public FormatConnectingFrameMetadata ToFormatConnectingFrameMetadata()

Returns

FormatConnectingFrameMetadata

The FormatConnectingFrameMetadata.