Browse Source

Moved the ExifHeader property to after the constructor to satisfy StyleCop.

pull/1877/head
WINDEV2110EVAL\User 5 years ago
parent
commit
8b9c334bca
  1. 12
      src/ImageSharp/Formats/Png/PngDecoderCore.cs

12
src/ImageSharp/Formats/Png/PngDecoderCore.cs

@ -112,12 +112,6 @@ namespace SixLabors.ImageSharp.Formats.Png
/// </summary>
private PngChunk? nextChunk;
/// <summary>
/// "Exif" and two zero bytes. Used for the legacy exif parsing.
/// </summary>
// This uses C# compiler's optimization to refer to the static data directly, no intermediate array allocations happen.
private static ReadOnlySpan<byte> ExifHeader => new byte[] { 0x45, 0x78, 0x69, 0x66, 0x00, 0x00 };
/// <summary>
/// Initializes a new instance of the <see cref="PngDecoderCore"/> class.
/// </summary>
@ -130,6 +124,12 @@ namespace SixLabors.ImageSharp.Formats.Png
this.ignoreMetadata = options.IgnoreMetadata;
}
/// <summary>
/// Gets the sequence of bytes for the exif header ("Exif" ASCII and two zero bytes). Used for the legacy exif parsing.
/// </summary>
// This uses C# compiler's optimization to refer to the static data directly, no intermediate array allocations happen.
private static ReadOnlySpan<byte> ExifHeader => new byte[] { 0x45, 0x78, 0x69, 0x66, 0x00, 0x00 };
/// <inheritdoc/>
public Configuration Configuration { get; }

Loading…
Cancel
Save