Table of Contents

Class GifEncoder

Namespace
Moments.Encoder
Assembly
GrindFest.dll
public class GifEncoder
Inheritance
object
GifEncoder

Constructors

GifEncoder()

Default constructor. Repeat will be set to -1 and Quality to 10.

GifEncoder(int, int)

Constructor with the number of times the set of GIF frames should be played.

Fields

m_ColorDepth
m_ColorTab
m_CurrentFrame
m_DisposalCode
m_FileStream
m_FrameDelay
m_HasStarted
m_Height
m_IndexedPixels
m_IsFirstFrame
m_IsSizeSet
m_PaletteSize
m_Pixels
m_Repeat
m_SampleInterval
m_ShouldCloseStream
m_UsedEntry
m_Width

Methods

AddFrame(GifFrame)

Adds next GIF frame. The frame is not written immediately, but is actually deferred until the next frame is received so that timing data can be inserted. Invoking

Finish()
flushes all frames.
AnalyzePixels()
Finish()

Flushes any pending data and closes output file. If writing to an OutputStream, the stream is not closed.

GetImagePixels()
SetDelay(int)

Sets the delay time between each frame, or changes it for subsequent frames (applies to last frame added).

SetFrameRate(float)

Sets frame rate in frames per second. Equivalent to

SetDelay(1000/fps)
.
SetSize(int, int)
Start(FileStream)

Initiates GIF file creation on the given stream. The stream is not closed automatically.

Start(string)

Initiates writing of a GIF file with the specified name. The stream will be handled for you.

WriteGraphicCtrlExt()
WriteImageDesc()
WriteLSD()
WriteNetscapeExt()
WritePalette()
WritePixels()
WriteShort(int)
WriteString(string)