diff --git a/src/ImageSharp/Formats/Png/PngEncoderCore.cs b/src/ImageSharp/Formats/Png/PngEncoderCore.cs
index 8663915279..e5b49c41d3 100644
--- a/src/ImageSharp/Formats/Png/PngEncoderCore.cs
+++ b/src/ImageSharp/Formats/Png/PngEncoderCore.cs
@@ -90,7 +90,7 @@ namespace SixLabors.ImageSharp.Formats.Png
///
/// The color profile name.
///
- private const string ProfileName = "ICC Profile";
+ private const string ColorProfileName = "ICC Profile";
///
/// Initializes a new instance of the class.
@@ -718,16 +718,15 @@ namespace SixLabors.ImageSharp.Formats.Png
return;
}
- string profileName = "ICC Profile";
byte[] iccProfileBytes = metaData.IccProfile.ToByteArray();
byte[] compressedData = this.GetZlibCompressedBytes(iccProfileBytes);
- int payloadLength = profileName.Length + compressedData.Length + 2;
+ int payloadLength = ColorProfileName.Length + compressedData.Length + 2;
using (IMemoryOwner owner = this.memoryAllocator.Allocate(payloadLength))
{
Span outputBytes = owner.GetSpan();
- PngConstants.Encoding.GetBytes(profileName).CopyTo(outputBytes);
- int bytesWritten = profileName.Length;
+ PngConstants.Encoding.GetBytes(ColorProfileName).CopyTo(outputBytes);
+ int bytesWritten = ColorProfileName.Length;
outputBytes[bytesWritten++] = 0; // Null separator.
outputBytes[bytesWritten++] = 0; // Compression.
compressedData.CopyTo(outputBytes.Slice(bytesWritten));