diff --git a/src/ImageSharp/Formats/Gif/DisposalMethod.cs b/src/ImageSharp/Formats/Gif/DisposalMethod.cs
index f553c204b..5371fc0fa 100644
--- a/src/ImageSharp/Formats/Gif/DisposalMethod.cs
+++ b/src/ImageSharp/Formats/Gif/DisposalMethod.cs
@@ -11,23 +11,26 @@ namespace SixLabors.ImageSharp.Formats.Gif
public enum DisposalMethod
{
///
- /// No disposal specified. The decoder is not required to take any action.
+ /// No disposal specified.
+ /// The decoder is not required to take any action.
///
Unspecified = 0,
///
- /// Do not dispose. The graphic is to be left in place.
+ /// Do not dispose.
+ /// The graphic is to be left in place.
///
NotDispose = 1,
///
- /// Restore to background color. The area used by the graphic must be restored to
- /// the background color.
+ /// Restore to background color.
+ /// The area used by the graphic must be restored to the background color.
///
RestoreToBackground = 2,
///
- /// Restore to previous. The decoder is required to restore the area overwritten by the
+ /// Restore to previous.
+ /// The decoder is required to restore the area overwritten by the
/// graphic with what was there prior to rendering the graphic.
///
RestoreToPrevious = 3
diff --git a/src/ImageSharp/Formats/Gif/GifEncoderCore.cs b/src/ImageSharp/Formats/Gif/GifEncoderCore.cs
index 14bfa6fd0..747867c80 100644
--- a/src/ImageSharp/Formats/Gif/GifEncoderCore.cs
+++ b/src/ImageSharp/Formats/Gif/GifEncoderCore.cs
@@ -27,22 +27,22 @@ namespace SixLabors.ImageSharp.Formats.Gif
private readonly byte[] buffer = new byte[20];
///
- /// Gets the TextEncoding
+ /// Gets the text encoding used to write comments.
///
private readonly Encoding textEncoding;
///
- /// Gets or sets the quantizer for reducing the color count.
+ /// Gets or sets the quantizer used to generate the color palette.
///
private readonly IQuantizer quantizer;
///
- /// Gets or sets a value indicating whether the metadata should be ignored when the image is being decoded.
+ /// A flag indicating whether to ingore the metadata when writing the image.
///
private readonly bool ignoreMetadata;
///
- /// The number of bits requires to store the image palette.
+ /// The number of bits requires to store the color palette.
///
private int bitDepth;
diff --git a/src/ImageSharp/Formats/Gif/GifImageFormatDetector.cs b/src/ImageSharp/Formats/Gif/GifImageFormatDetector.cs
index 36346f606..bfbd334b0 100644
--- a/src/ImageSharp/Formats/Gif/GifImageFormatDetector.cs
+++ b/src/ImageSharp/Formats/Gif/GifImageFormatDetector.cs
@@ -16,17 +16,11 @@ namespace SixLabors.ImageSharp.Formats.Gif
///
public IImageFormat DetectFormat(ReadOnlySpan header)
{
- if (this.IsSupportedFileFormat(header))
- {
- return ImageFormats.Gif;
- }
-
- return null;
+ return this.IsSupportedFileFormat(header) ? ImageFormats.Gif : null;
}
private bool IsSupportedFileFormat(ReadOnlySpan header)
{
- // TODO: This should be in constants
return header.Length >= this.HeaderSize &&
header[0] == 0x47 && // G
header[1] == 0x49 && // I
diff --git a/src/ImageSharp/Formats/Gif/IGifDecoderOptions.cs b/src/ImageSharp/Formats/Gif/IGifDecoderOptions.cs
index a2288f30a..e99f09add 100644
--- a/src/ImageSharp/Formats/Gif/IGifDecoderOptions.cs
+++ b/src/ImageSharp/Formats/Gif/IGifDecoderOptions.cs
@@ -16,7 +16,7 @@ namespace SixLabors.ImageSharp.Formats.Gif
bool IgnoreMetadata { get; }
///
- /// Gets the encoding that should be used when reading comments.
+ /// Gets the text encoding that should be used when reading comments.
///
Encoding TextEncoding { get; }
diff --git a/src/ImageSharp/Formats/Gif/IGifEncoderOptions.cs b/src/ImageSharp/Formats/Gif/IGifEncoderOptions.cs
index f7bc5f4ed..44dd19db6 100644
--- a/src/ImageSharp/Formats/Gif/IGifEncoderOptions.cs
+++ b/src/ImageSharp/Formats/Gif/IGifEncoderOptions.cs
@@ -17,12 +17,12 @@ namespace SixLabors.ImageSharp.Formats.Gif
bool IgnoreMetadata { get; }
///
- /// Gets the encoding that should be used when writing comments.
+ /// Gets the text encoding used to write comments.
///
Encoding TextEncoding { get; }
///
- /// Gets the quantizer for reducing the color count.
+ /// Gets the quantizer used to generate the color palette.
///
IQuantizer Quantizer { get; }
}
diff --git a/src/ImageSharp/Formats/Gif/ImageExtensions.cs b/src/ImageSharp/Formats/Gif/ImageExtensions.cs
index 78acadb4b..1c41285a9 100644
--- a/src/ImageSharp/Formats/Gif/ImageExtensions.cs
+++ b/src/ImageSharp/Formats/Gif/ImageExtensions.cs
@@ -1,10 +1,8 @@
// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
-using System;
using System.IO;
using SixLabors.ImageSharp.Advanced;
-using SixLabors.ImageSharp.Formats;
using SixLabors.ImageSharp.Formats.Gif;
using SixLabors.ImageSharp.PixelFormats;
@@ -16,7 +14,7 @@ namespace SixLabors.ImageSharp
public static partial class ImageExtensions
{
///
- /// Saves the image to the given stream with the gif format.
+ /// Saves the image to the given stream in the gif format.
///
/// The pixel format.
/// The image this method extends.
@@ -27,7 +25,7 @@ namespace SixLabors.ImageSharp
=> source.SaveAsGif(stream, null);
///
- /// Saves the image to the given stream with the gif format.
+ /// Saves the image to the given stream in the gif format.
///
/// The pixel format.
/// The image this method extends.