Esempio n. 1
0
        internal static GifHeader ReadHeader(Stream stream)
        {
            var header = new GifHeader();

            header.Read(stream);
            return(header);
        }
Esempio n. 2
0
        private void Read(Stream stream, bool metadataOnly)
        {
            Header = GifHeader.ReadHeader(stream);

            if (Header.LogicalScreenDescriptor.HasGlobalColorTable)
            {
                GlobalColorTable = GifHelpers.ReadColorTable(stream, Header.LogicalScreenDescriptor.GlobalColorTableSize);
            }
            ReadFrames(stream, metadataOnly);

            var netscapeExtension =
                Extensions
                .OfType <GifApplicationExtension>()
                .FirstOrDefault(GifHelpers.IsNetscapeExtension);

            if (netscapeExtension != null)
            {
                RepeatCount = GifHelpers.GetRepeatCount(netscapeExtension);
            }
            else
            {
                RepeatCount = 1;
            }
        }
 internal static GifHeader ReadHeader(Stream stream)
 {
     var header = new GifHeader();
     header.Read(stream);
     return header;
 }