public static void OutputGIF(Bitmap f, String fn) { GifEncoder gif = new GifEncoder(); gif.SetQuality(4); gif.Start(fn); gif.AddFrame(f); gif.Finish(); }
public static void OutputAGIF(IEnumerable<Frame> frames, String fn) { frames = frames.OrderBy(f => f.Number); GifEncoder gif = new GifEncoder(); gif.SetQuality(4); gif.SetRepeat(0); gif.Start(fn); foreach (Frame f in frames) { gif.SetDelay(f.Delay); gif.AddFrame(f.Image); } gif.Finish(); }