private void Read(Stream stream) { this.Signature = GifHelpers.ReadString(stream, 3); if (this.Signature != "GIF") { throw GifHelpers.InvalidSignatureException(this.Signature); } this.Version = GifHelpers.ReadString(stream, 3); if ((this.Version != "87a") && (this.Version != "89a")) { throw GifHelpers.UnsupportedVersionException(this.Version); } this.LogicalScreenDescriptor = GifLogicalScreenDescriptor.ReadLogicalScreenDescriptor(stream); }
private void Read(Stream stream) { if (stream == null) { return; } Signature = GifHelpers.ReadString(stream, 3); if (Signature != "GIF") { throw GifHelpers.InvalidSignatureException(Signature); } Version = GifHelpers.ReadString(stream, 3); if (Version != "87a" && Version != "89a") { throw GifHelpers.UnsupportedVersionException(Version); } LogicalScreenDescriptor = GifLogicalScreenDescriptor.ReadLogicalScreenDescriptor(stream); }