using System; using System.IO; using Lumpio.Gif; using System.Drawing; using System.Drawing.Imaging; using System.Net; using System.Net.Sockets; using System.Collections; namespace Lumpio.Tests.Gif { public class GifWriterTest { public static void Main() { new GifWriterTest(); } public GifWriterTest() { GifWriter gw = new GifWriter(50, 50, null); gw.Palette[0] = Color.FromArgb(0xFFFFFF); gw.Palette[1] = Color.FromArgb(0x000000); gw.BgColor = 0; BinaryWriter w = new BinaryWriter(new FileStream("krep2.gif", FileMode.Create)); byte[] image = new byte[50 * 50]; int x, y; for (x = 0; x < 50; x++) { image[x] = 1; } for (y = 1; y < 50; y++) { image[y * 50] = 1; for (x = 1; x < 50; x++) { image[y * 50 + x] = 1; } } Console.WriteLine("hai"); w.Write(gw.GetHeaders()); w.Write(gw.GetFrame(image)); w.Write(gw.GetTrailer()); w.Close(); } } }