From f36f9ee727be14e1fd47cc12cf1b03b79039bbb7 Mon Sep 17 00:00:00 2001 From: Sergio Pedri Date: Thu, 27 Feb 2020 20:25:34 +0100 Subject: [PATCH] Code style tweaks --- src/ImageSharp/Formats/Gif/GifConstants.cs | 20 +++++++-------- src/ImageSharp/Formats/Png/PngConstants.cs | 30 +++++++++++----------- 2 files changed, 25 insertions(+), 25 deletions(-) diff --git a/src/ImageSharp/Formats/Gif/GifConstants.cs b/src/ImageSharp/Formats/Gif/GifConstants.cs index c945ce122..06c4b3fc6 100644 --- a/src/ImageSharp/Formats/Gif/GifConstants.cs +++ b/src/ImageSharp/Formats/Gif/GifConstants.cs @@ -92,6 +92,16 @@ namespace SixLabors.ImageSharp.Formats.Gif /// public static readonly Encoding Encoding = Encoding.ASCII; + /// + /// The collection of mimetypes that equate to a Gif. + /// + public static readonly IEnumerable MimeTypes = new[] { "image/gif" }; + + /// + /// The collection of file extensions that equate to a Gif. + /// + public static readonly IEnumerable FileExtensions = new[] { "gif" }; + /// /// Gets the ASCII encoded bytes used to identify the GIF file (combining and ). /// @@ -111,15 +121,5 @@ namespace SixLabors.ImageSharp.Formats.Gif (byte)'P', (byte)'E', (byte)'2', (byte)'.', (byte)'0' }; - - /// - /// The collection of mimetypes that equate to a Gif. - /// - public static readonly IEnumerable MimeTypes = new[] { "image/gif" }; - - /// - /// The collection of file extensions that equate to a Gif. - /// - public static readonly IEnumerable FileExtensions = new[] { "gif" }; } } diff --git a/src/ImageSharp/Formats/Png/PngConstants.cs b/src/ImageSharp/Formats/Png/PngConstants.cs index 4ad698e32..247bb3c75 100644 --- a/src/ImageSharp/Formats/Png/PngConstants.cs +++ b/src/ImageSharp/Formats/Png/PngConstants.cs @@ -37,21 +37,6 @@ namespace SixLabors.ImageSharp.Formats.Png /// public static readonly IEnumerable FileExtensions = new[] { "png" }; - /// - /// Gets the header bytes identifying a Png. - /// - public static ReadOnlySpan HeaderBytes => new byte[] - { - 0x89, // Set the high bit. - 0x50, // P - 0x4E, // N - 0x47, // G - 0x0D, // Line ending CRLF - 0x0A, // Line ending CRLF - 0x1A, // EOF - 0x0A // LF - }; - /// /// The header bytes as a big-endian coded ulong. /// @@ -78,5 +63,20 @@ namespace SixLabors.ImageSharp.Formats.Png /// The minimum length of a keyword in a text chunk is 1 byte. /// public const int MinTextKeywordLength = 1; + + /// + /// Gets the header bytes identifying a Png. + /// + public static ReadOnlySpan HeaderBytes => new byte[] + { + 0x89, // Set the high bit. + 0x50, // P + 0x4E, // N + 0x47, // G + 0x0D, // Line ending CRLF + 0x0A, // Line ending CRLF + 0x1A, // EOF + 0x0A // LF + }; } }