Пример #1
0
        private void Read(Stream stream, IEnumerable <GifExtension> controlExtensions, bool metadataOnly)
        {
            // Note: at this point, the Image Separator (0x2C) has already been read

            Descriptor = GifImageDescriptor.ReadImageDescriptor(stream);

            if (Descriptor.HasLocalColorTable)
            {
                LocalColorTable = GifHelpers.ReadColorTable(stream, Descriptor.LocalColorTableSize);
            }

            ImageData  = GifImageData.ReadImageData(stream, metadataOnly);
            Extensions = controlExtensions.ToList().AsReadOnly();
        }
Пример #2
0
 public static GifImageDescriptor ReadImageDescriptor(Stream stream)
 {
     var descriptor = new GifImageDescriptor();
     descriptor.Read(stream);
     return descriptor;
 }