Class GifGraphicsControlBlock
- Namespace
- Aspose.Imaging.FileFormats.Gif.Blocks
- Assembly
- Aspose.Imaging.dll
Gif graphics control block.
public class GifGraphicsControlBlock : GifBlock, IGifBlock
- Inheritance
-
GifGraphicsControlBlock
- Implements
- Inherited Members
Constructors
GifGraphicsControlBlock()
Initializes a new instance of the GifGraphicsControlBlock class.
public GifGraphicsControlBlock()
GifGraphicsControlBlock(byte, ushort, byte)
Initializes a new instance of the GifGraphicsControlBlock class.
public GifGraphicsControlBlock(byte flags, ushort delayTime, byte transparentColorIndex)
Parameters
flags
byteThe flags.
delayTime
ushortThe delay time expressed in 1/100 seconds.
transparentColorIndex
byteThe transparent color index.
GifGraphicsControlBlock(ushort, bool, byte, bool, DisposalMethod)
Initializes a new instance of the GifGraphicsControlBlock class.
public GifGraphicsControlBlock(ushort delayTime, bool hasTransparentColor, byte transparentColorIndex, bool requiresUserInput, DisposalMethod disposalMethod)
Parameters
delayTime
ushortThe delay time expressed in 1/100 seconds.
hasTransparentColor
boolif set to
true
thetransparentColorIndex
is valid.transparentColorIndex
byteThe transparent color index.
requiresUserInput
boolif set to
true
the user input is expected.disposalMethod
DisposalMethodThe disposal method.
Fields
BlockHeaderSize
Specifies the block header size.
public const int BlockHeaderSize = 8
Field Value
ExtensionLabel
Extension label.
public const byte ExtensionLabel = 249
Field Value
SubBlockSize
Gets the sub-block size.
public const byte SubBlockSize = 4
Field Value
Properties
DelayTime
Gets or sets the frame delay time expressed in 1/100 seconds.
public ushort DelayTime { get; set; }
Property Value
DisposalMethod
Gets or sets the disposal method.
public DisposalMethod DisposalMethod { get; set; }
Property Value
- DisposalMethod
The disposal method.
Flags
Gets or sets the flags.
public byte Flags { get; set; }
Property Value
- byte
The flags.
HasTransparentColor
Gets or sets a value indicating whether graphics control block has transparent color.
public bool HasTransparentColor { get; set; }
Property Value
- bool
true
if graphics control block has transparent color; otherwise,false
.
TransparentColorIndex
Gets or sets the transparent color index.
public byte TransparentColorIndex { get; set; }
Property Value
- byte
The transparent color index.
UserInputExpected
Gets or sets a value indicating whether user input is expected.
public bool UserInputExpected { get; set; }
Property Value
- bool
true
if user input is expected; otherwise,false
.
Methods
CreateFlags(bool, bool, DisposalMethod)
Creates the flags.
public static byte CreateFlags(bool hasTransparentColor, bool requiresUserInput, DisposalMethod disposalMethod)
Parameters
hasTransparentColor
boolif set to
true
the GifGraphicsControlBlock has valid transparent color index.requiresUserInput
boolif set to
true
the user input is expected.disposalMethod
DisposalMethodThe disposal method.
Returns
- byte
The generated flags.
Save(Stream)
Saves the block to the specified stream.
public override void Save(Stream stream)
Parameters
stream
StreamThe stream to save data to.