Inheritance: GifBlock
示例#1
0
        public static GifHeader ReadHeader(Stream stream)
        {
            var header = new GifHeader();

            header.Read(stream);
            return(header);
        }
示例#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;
            }
        }
示例#3
0
 public static GifHeader ReadHeader(Stream stream)
 {
     var header = new GifHeader();
     header.Read(stream);
     return header;
 }