public void TestEncodeGif()
		{
			var assembly = Assembly.GetExecutingAssembly();
			var resourceName = "RopHelperTest.TestImage.gif";
			var gifstream = assembly.GetManifestResourceStream(resourceName);
			var midecode = GifBitmap.FromStream(gifstream,true);
			Assert.IsNotNull(midecode);
			gifstream.Close();
			var frame = midecode.Frames[0];
			var pixelgif = frame.FrameDbg;
			var comprimido = frame.RawDbg;
			var enc = new GifLZWEncoder(8);
			var res = enc.Compress(pixelgif);
			Assert.IsTrue(Enumerable.SequenceEqual(comprimido, res));
		}
		public override void Save(Stream gifstream)
		{
			gifstream.WriteByte((byte)GifFlags.ImageSeparator);
			gifstream.WriteStruct(Header);
			if (LocalColorTableFlag)
			{
				for (var i = 0; i < LocalColorMap.Length; i++)
				{
					var entry = (Color24)LocalColorMap[i];
					gifstream.WriteStruct(entry);
				}
			}
			var enc = new GifLZWEncoder(8);
			var encbytes = enc.Compress(Frame.Bitmap8ToPixels());
			gifstream.WriteByte(8);
			var blocks = GifBitmap.MakeSubBlocks(encbytes);
			gifstream.Write(blocks, 0, blocks.Length);
		}