添加项目文件。

This commit is contained in:
akwkevin
2021-07-23 09:42:22 +08:00
commit f25a958797
2798 changed files with 352360 additions and 0 deletions

View File

@@ -0,0 +1,28 @@
using System.Collections.Generic;
using System.IO;
namespace WpfAnimatedGif.Decoding
{
internal abstract class GifBlock
{
internal static GifBlock ReadBlock(Stream stream, IEnumerable<GifExtension> controlExtensions, bool metadataOnly)
{
int blockId = stream.ReadByte();
if (blockId < 0)
throw GifHelpers.UnexpectedEndOfStreamException();
switch (blockId)
{
case GifExtension.ExtensionIntroducer:
return GifExtension.ReadExtension(stream, controlExtensions, metadataOnly);
case GifFrame.ImageSeparator:
return GifFrame.ReadFrame(stream, controlExtensions, metadataOnly);
case GifTrailer.TrailerByte:
return GifTrailer.ReadTrailer();
default:
throw GifHelpers.UnknownBlockTypeException(blockId);
}
}
internal abstract GifBlockKind Kind { get; }
}
}