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
파일 보기 프로젝트 열기: dbremner/ScreenToGif 1 사용 예제들

공개 메소드들

메소드 설명
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