Class GifGraphicsControlBlock

Class GifGraphicsControlBlock

Namespace: Aspose.Imaging.FileFormats.Gif.Blocks
Assembly: Aspose.Imaging.dll (25.4.0)

Gif graphics control block.

[JsonObject(MemberSerialization.OptIn)]
public class GifGraphicsControlBlock : GifBlock, IGifBlock

Inheritance

objectGifBlockGifGraphicsControlBlock

Implements

IGifBlock

Inherited Members

GifBlock.ExtensionIntroducer, GifBlock.Save(Stream), GifBlock.IsChanged, object.GetType(), object.MemberwiseClone(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()

Constructors

GifGraphicsControlBlock()

Initializes a new instance of the Aspose.Imaging.FileFormats.Gif.Blocks.GifGraphicsControlBlock class.

public GifGraphicsControlBlock()

GifGraphicsControlBlock(byte, ushort, byte)

Initializes a new instance of the Aspose.Imaging.FileFormats.Gif.Blocks.GifGraphicsControlBlock class.

public GifGraphicsControlBlock(byte flags, ushort delayTime, byte transparentColorIndex)

Parameters

flags byte

The flags.

delayTime ushort

The delay time expressed in 1/100 seconds.

transparentColorIndex byte

The transparent color index.

GifGraphicsControlBlock(ushort, bool, byte, bool, DisposalMethod)

Initializes a new instance of the Aspose.Imaging.FileFormats.Gif.Blocks.GifGraphicsControlBlock class.

public GifGraphicsControlBlock(ushort delayTime, bool hasTransparentColor, byte transparentColorIndex, bool requiresUserInput, DisposalMethod disposalMethod)

Parameters

delayTime ushort

The delay time expressed in 1/100 seconds.

hasTransparentColor bool

if set to true the transparentColorIndex is valid.

transparentColorIndex byte

The transparent color index.

requiresUserInput bool

if set to true the user input is expected.

disposalMethod DisposalMethod

The disposal method.

Fields

BlockHeaderSize

Specifies the block header size.

public const int BlockHeaderSize = 8

Field Value

int

ExtensionLabel

Extension label.

public const byte ExtensionLabel = 249

Field Value

byte

SubBlockSize

Gets the sub-block size.

public const byte SubBlockSize = 4

Field Value

byte

Properties

DelayTime

Gets or sets the frame delay time expressed in 1/100 seconds.

public ushort DelayTime { get; set; }

Property Value

ushort

DisposalMethod

Gets or sets the disposal method.

public DisposalMethod DisposalMethod { get; set; }

Property Value

DisposalMethod

Flags

Gets or sets the flags.

public byte Flags { get; set; }

Property Value

byte

HasTransparentColor

Gets or sets a value indicating whether graphics control block has transparent color.

public bool HasTransparentColor { get; set; }

Property Value

bool

TransparentColorIndex

Gets or sets the transparent color index.

public byte TransparentColorIndex { get; set; }

Property Value

byte

UserInputExpected

Gets or sets a value indicating whether user input is expected.

public bool UserInputExpected { get; set; }

Property Value

bool

Methods

CreateFlags(bool, bool, DisposalMethod)

Creates the flags.

public static byte CreateFlags(bool hasTransparentColor, bool requiresUserInput, DisposalMethod disposalMethod)

Parameters

hasTransparentColor bool

if set to true the Aspose.Imaging.FileFormats.Gif.Blocks.GifGraphicsControlBlock has valid transparent color index.

requiresUserInput bool

if set to true the user input is expected.

disposalMethod DisposalMethod

The disposal method.

Returns

byte

The generated flags.

Save(Stream)

Saves the block to the specified stream.

public override void Save(Stream stream)

Parameters

stream Stream

The stream to save data to.