private GifImageDescriptor ReadImageDescriptor()
{
byte[] buffer = new byte[9];
_stream.Read(buffer, 0, buffer.Length);
byte packed = buffer[8];
GifImageDescriptor imageDescriptor = new GifImageDescriptor();
imageDescriptor.Left = BitConverter.ToInt16(buffer, 0);
imageDescriptor.Top = BitConverter.ToInt16(buffer, 2);
imageDescriptor.Width = BitConverter.ToInt16(buffer, 4);
imageDescriptor.Height = BitConverter.ToInt16(buffer, 6);
imageDescriptor.LocalColorTableFlag = ((packed & 0x80) >> 7) == 1;
imageDescriptor.LocalColorTableSize = 2 << (packed & 0x07);
imageDescriptor.InterlaceFlag = ((packed & 0x40) >> 6) == 1;
return imageDescriptor;
}