C# Класс ScreenToGif.Encoding.GifEncoder

Encodes multiple images as an animated gif to a stream.
ALWAYS wire this up in a "using" block
Disposing the encoder will complete the file.
Uses default .net GIF encoding and adds animation headers.
Наследование: IDisposable
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
AddFrame ( Image img, int x, int y, System.TimeSpan frameDelay = null ) : void

Adds a frame to this animation.

Dispose ( ) : void
GifEncoder ( Stream stream, int width = null, int height = null, int repeatCount = null ) : System

Encodes multiple images as an animated gif to a stream.
ALWAYS wire this in a using block
Disposing the encoder will complete the file.
Uses default .net GIF encoding and adds animation headers.

Приватные методы

Метод Описание
InitHeader ( Stream sourceGif, int w, int h ) : void
WriteByte ( int value ) : void
WriteColorTable ( Stream sourceGif ) : void
WriteGraphicControlBlock ( Stream sourceGif, System.TimeSpan frameDelay ) : void
WriteImageBlock ( Stream sourceGif, bool includeColorTable, int x, int y, int h, int w ) : void
WriteShort ( int value ) : void
WriteString ( string value ) : void

Описание методов

AddFrame() публичный Метод

Adds a frame to this animation.
public AddFrame ( Image img, int x, int y, System.TimeSpan frameDelay = null ) : void
img Image The image to add
x int The positioning x offset this image should be displayed at.
y int The positioning y offset this image should be displayed at.
frameDelay System.TimeSpan The delay of the redraw of the next frame.
Результат void

Dispose() публичный Метод

public Dispose ( ) : void
Результат void

GifEncoder() публичный Метод

Encodes multiple images as an animated gif to a stream.
ALWAYS wire this in a using block
Disposing the encoder will complete the file.
Uses default .net GIF encoding and adds animation headers.
public GifEncoder ( Stream stream, int width = null, int height = null, int repeatCount = null ) : System
stream Stream The stream that will be written to.
width int Sets the width for this gif or null to use the first frame's width.
height int Sets the height for this gif or null to use the first frame's height.
repeatCount int The repeat count of the animation
Результат System