Provides methods for creating application and graphics blocks needed to write a animated Gif.
More...
|
static void | CreateAnimatedGif (List< string > gifFiles, int delay, string outputFile) |
|
static byte[] | CreateGraphicControlExtensionBlock (int delay) |
| Written before each frame - specifies the frame's delay and the index of the transparent color (0) More...
|
|
static byte[] | CreateGraphicControlExtensionBlock (int delay, byte transparentColorIndex) |
| Written before each frame - specifies the frame's delay and the index of the transparent color More...
|
|
static byte[] | CreateLoopBlock () |
| Creates a Loop Block (Netscape appliation extension) for infinite looping. Written after the last frame's image data More...
|
|
static byte[] | CreateLoopBlock (int numberOfRepeatings) |
| Creates a Loop block for the specified number of repeats. Written after the last frame's image data. Do NOT call this if numberOfRepeatings=1. IE and FF < 3 (incorrectly) loop infinitely when loops=1. Simply omit the extension in that case. More...
|
|
Provides methods for creating application and graphics blocks needed to write a animated Gif.
Definition at line 22 of file GifCreator.cs.
static byte [] ImageResizer.Plugins.AnimatedGifs.GifCreator.CreateGraphicControlExtensionBlock |
( |
int |
delay | ) |
|
|
inlinestatic |
Written before each frame - specifies the frame's delay and the index of the transparent color (0)
- Parameters
-
- Returns
Definition at line 49 of file GifCreator.cs.
static byte[] CreateGraphicControlExtensionBlock(int delay)
Written before each frame - specifies the frame's delay and the index of the transparent color (0) ...
static byte [] ImageResizer.Plugins.AnimatedGifs.GifCreator.CreateGraphicControlExtensionBlock |
( |
int |
delay, |
|
|
byte |
transparentColorIndex |
|
) |
| |
|
inlinestatic |
Written before each frame - specifies the frame's delay and the index of the transparent color
- Parameters
-
delay | |
transparentColorIndex | |
- Returns
Definition at line 59 of file GifCreator.cs.
67 byte[] result =
new byte[8];
70 result[0] = (byte)0x21;
71 result[1] = (byte)0xF9;
72 result[2] = (byte)0x04;
79 result[4] = (byte)(delay % 256);
80 result[5] = (byte)(delay / 256);
81 result[6] = transparentColorIndex;
82 result[7] = (byte)0x00;
static byte [] ImageResizer.Plugins.AnimatedGifs.GifCreator.CreateLoopBlock |
( |
| ) |
|
|
inlinestatic |
Creates a Loop Block (Netscape appliation extension) for infinite looping. Written after the last frame's image data
- Returns
Definition at line 89 of file GifCreator.cs.
static byte[] CreateLoopBlock()
Creates a Loop Block (Netscape appliation extension) for infinite looping. Written after the last fra...
static byte [] ImageResizer.Plugins.AnimatedGifs.GifCreator.CreateLoopBlock |
( |
int |
numberOfRepeatings | ) |
|
|
inlinestatic |
Creates a Loop block for the specified number of repeats. Written after the last frame's image data. Do NOT call this if numberOfRepeatings=1. IE and FF < 3 (incorrectly) loop infinitely when loops=1. Simply omit the extension in that case.
- Parameters
-
- Returns
Definition at line 97 of file GifCreator.cs.
109 byte rep1 = (byte)(numberOfRepeatings % 256);
110 byte rep2 = (byte)(numberOfRepeatings / 256);
111 byte[] result =
new byte[19];
112 result[0] = (byte)0x21;
113 result[1] = (byte)0xFF;
114 result[2] = (byte)0x0B;
115 result[3] = (byte)
'N';
116 result[4] = (byte)
'E';
117 result[5] = (byte)
'T';
118 result[6] = (byte)
'S';
119 result[7] = (byte)
'C';
120 result[8] = (byte)
'A';
121 result[9] = (byte)
'P';
122 result[10] = (byte)
'E';
123 result[11] = (byte)
'2';
124 result[12] = (byte)
'.';
125 result[13] = (byte)
'0';
126 result[14] = (byte)0x03;
127 result[15] = (byte)0x01;
128 result[16] = (byte)rep1;
129 result[17] = (byte)rep2;
130 result[18] = (byte)0x00;
The documentation for this class was generated from the following file:
- C:/Users/nathanael/Documents/resizer/Plugins/AnimatedGifs/GifCreator.cs