/// <summary>Resets the frame state before reading the next image</summary> protected void ResetFrame() { lastDispose = dispose; lastImage = image; lastBgColor = bgColor; transparency = false; delay = 0; localColorTable = null; dispose = DisposeMode.NoAction; }
/// <summary>Reads the Graphic Control Extension values</summary> protected void ReadGraphicControlExt() { Read(); // block size int packed = Read(); // packed fields dispose = (DisposeMode)((packed & 0x1c) >> 2); // disposal method if (dispose == DisposeMode.NoAction) { dispose = DisposeMode.LeaveInPlace; // elect to keep old image if discretionary } transparency = (packed & 1) != 0; delay = ReadShort() * 10; // delay in milliseconds transIndex = Read(); // transparent color index Read(); // block terminator }