Beispiel #1
0
        private async Task ReadInternalAsync(Stream stream)
        {
            Signature = await GifHelpers.ReadStringAsync(stream, 3).ConfigureAwait(false);

            if (Signature != "GIF")
            {
                throw GifHelpers.InvalidSignatureException(Signature);
            }
            Version = await GifHelpers.ReadStringAsync(stream, 3).ConfigureAwait(false);

            if (Version != "87a" && Version != "89a")
            {
                throw GifHelpers.UnsupportedVersionException(Version);
            }
            LogicalScreenDescriptor = await GifLogicalScreenDescriptor.ReadAsync(stream).ConfigureAwait(false);
        }