[]
        
(Showing Draft Content)

GrapeCity.Documents.Imaging.GifFrame

Class GifFrame

Namespace
GrapeCity.Documents.Imaging
Assembly
GcDocs.Imaging.dll

Represents a single frame in the GIF file.

public class GifFrame
Inheritance
object
GifFrame
Inherited Members
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()

Properties

BasedOnFrame

Gets the index of a frame used as the base for the current frame, -1 if the current frame doesn't depend on previous frames.

public int BasedOnFrame { get; }

Property Value

int

Bottom

Gets the y-coordinate that is the sum of Top and Height property values.

public int Bottom { get; }

Property Value

int

DelayTime

Gets the number of hundredths (1/100) of a second to wait before continuing.

If the value is negative, the delay time is not specified.

public int DelayTime { get; }

Property Value

int

DisposalMethod

Gets the way in which the GIF frame has to be treated after being displayed.

public GifDisposalMethod DisposalMethod { get; }

Property Value

GifDisposalMethod

FrameIndex

Gets the index of the frame in the associated GIF file.

public int FrameIndex { get; }

Property Value

int

HasLocalPalette

Gets a value indicating if the frame uses colors from the Local Color Table.

public bool HasLocalPalette { get; }

Property Value

bool

Height

Gets the height of the frame image in pixels.

public int Height { get; }

Property Value

int

Left

Gets the x-coordinate, in pixels, of the left edge of the frame image, with respect to the left edge of the Logical Screen.

public int Left { get; }

Property Value

int

Opaque

Gets a value indicating if transparent pixels don't occur in the frame data.

public bool Opaque { get; }

Property Value

bool

Reader

Gets the associated GcGifReader.

public GcGifReader Reader { get; }

Property Value

GcGifReader

Right

Gets the x-coordinate that is the sum of Left and Width property values.

public int Right { get; }

Property Value

int

Top

Gets the y-coordinate, in pixels, of the top edge of the frame image with respect to the top edge of the Logical Screen.

public int Top { get; }

Property Value

int

UserInput

Gets a value indicating whether or not user input is expected before continuing.

When a DelayTime is not 0 and the UserInput flag is set, processing will continue when user input is received or when the delay time expires, whichever occurs first.

public bool UserInput { get; }

Property Value

bool

Width

Gets the width of the frame image in pixels.

public int Width { get; }

Property Value

int

Methods

GetLocalPalette()

Returns a palette with sorted opaque colors in 32-bit ARGB format retrieved from the Local Color Table.

public uint[] GetLocalPalette()

Returns

uint[]

ReadAsIndexed8bppBitmap()

Gets the frame image as a Indexed8bppBitmap.

public Indexed8bppBitmap ReadAsIndexed8bppBitmap()

Returns

Indexed8bppBitmap

ToGcBitmap()

Gets the frame image as a GcBitmap.

Many GIF files use frames with transparent pixels where the previous frame is partly visible. If you read multiple GIF frames you can improve the performance dramatically by reading frames into the same GcBitmap and passing index of the previous frame in the additional contentFrameIndex parameter.

public GcBitmap ToGcBitmap()

Returns

GcBitmap

ToGcBitmap(GcBitmap, int)

Reads the frame image into an existing GcBitmap.

public void ToGcBitmap(GcBitmap bmp, int contentFrameIndex = -1)

Parameters

bmp GcBitmap

The source and target GcBitmap object.

contentFrameIndex int

Index of a GIF frame rendered to GcBitmap that is passed in the bmp parameter, if any.

ToImage(ImageBinding)

Creates an Image object for the frame.

public Image ToImage(ImageBinding binding = ImageBinding.FilePath)

Parameters

binding ImageBinding

Specifies how the image data is attached to the Image object.

Returns

Image

The newly created Image object.