Class GifDetails
Details only GIF has, kept in FormatDetails.
public sealed class GifDetails : FormatDetails
- Inheritance
-
GifDetails
- 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
BackgroundIndex
Gets or sets the background color index from the logical screen descriptor.
public byte BackgroundIndex { get; set; }
Property Value
GlobalPalette
Gets or sets the global color table. Empty if the file had none.
public ReadOnlyMemory<Rgb8> GlobalPalette { get; set; }
Property Value
OtherExtensions
Gets the application extensions Egami does not read itself, in file order.
public IList<GifApplicationExtension> OtherExtensions { get; }
Property Value
PixelAspectRatio
Gets or sets the pixel aspect ratio (width over height), or null if the file gave none. The logical screen descriptor stores it as one byte, (ratio × 64) − 15, so a written ratio is rounded to the nearest 1/64 between 1/4 and 4.
public double? PixelAspectRatio { get; set; }
Property Value
RepetitionCount
Gets or sets the loop value as the NETSCAPE2.0 block stored it, counting repeats after the first play (0 for forever), or null if the file had no such block. LoopCount holds the total plays.
public int? RepetitionCount { get; set; }
Property Value
- int?
Version
Gets or sets the version from the header: "87a" or "89a". Defaults to "89a", which the writer always writes.
public string Version { get; set; }
Property Value
Methods
Copy()
Returns a deep copy.
public override FormatDetails Copy()
Returns
- FormatDetails
The copy.