internal static GifImageData ReadImageData(Stream stream, bool metadataOnly)
        {
            GifImageData gifImageData = new GifImageData();

            gifImageData.Read(stream, metadataOnly);
            return(gifImageData);
        }
 private void Read(
     Stream stream,
     IEnumerable <GifExtension> controlExtensions,
     bool metadataOnly)
 {
     this.Descriptor = GifImageDescriptor.ReadImageDescriptor(stream);
     if (this.Descriptor.HasLocalColorTable)
     {
         this.LocalColorTable = GifHelpers.ReadColorTable(stream, this.Descriptor.LocalColorTableSize);
     }
     this.ImageData  = GifImageData.ReadImageData(stream, metadataOnly);
     this.Extensions = (IList <GifExtension>)controlExtensions.ToList <GifExtension>().AsReadOnly();
 }