Table of Contents

Class GifFrameDetails

Namespace
Egami.Formats.Gif
Assembly
Egami.dll

Details of one GIF frame, kept in FormatDetails.

public sealed class GifFrameDetails : FormatDetails
Inheritance
GifFrameDetails
Inherited Members

Examples

using Raster<Rgba8> clip = Raster.Load<Rgba8>("pan.gif");
GifDetails details = (GifDetails)clip.Metadata.FormatDetails!;
Console.WriteLine($"GIF{details.Version}, {details.GlobalPalette.Length} global colors, repeats {details.RepetitionCount}");
foreach (GifApplicationExtension extension in details.OtherExtensions)
{
    Console.WriteLine($"Kept extension {extension.Identifier}: {extension.Data.Length} bytes");
}

foreach (Frame<Rgba8> frame in clip.Frames)
{
    if (frame.Metadata.FormatDetails is GifFrameDetails frameDetails)
    {
        Console.WriteLine($"Frame: {frameDetails.LocalPalette.Length} local colors, transparent index {frameDetails.TransparentIndex}");
    }
}

Properties

Interlaced

Gets or sets whether the frame was stored interlaced.

public bool Interlaced { get; set; }

Property Value

bool

LocalPalette

Gets or sets the frame's own color table. Empty if it used the global one.

public ReadOnlyMemory<Rgb8> LocalPalette { get; set; }

Property Value

ReadOnlyMemory<Rgb8>

TransparentIndex

Gets or sets the transparent color index, or null if the frame had none.

public int? TransparentIndex { get; set; }

Property Value

int?

Methods

Copy()

Returns a deep copy.

public override FormatDetails Copy()

Returns

FormatDetails

The copy.