diff --git a/src/ImageSharp/MetaData/Profiles/ICC/DataWriter/IccDataWriter.Primitives.cs b/src/ImageSharp/MetaData/Profiles/ICC/DataWriter/IccDataWriter.Primitives.cs
index a58f62519c..404285b500 100644
--- a/src/ImageSharp/MetaData/Profiles/ICC/DataWriter/IccDataWriter.Primitives.cs
+++ b/src/ImageSharp/MetaData/Profiles/ICC/DataWriter/IccDataWriter.Primitives.cs
@@ -178,7 +178,7 @@ namespace SixLabors.ImageSharp.MetaData.Profiles.Icc
return 0;
}
- byte[] data = AsciiEncoding.GetBytes(value);
+ byte[] data = Encoding.ASCII.GetBytes(value);
this.dataStream.Write(data, 0, data.Length);
return data.Length;
}
@@ -215,7 +215,7 @@ namespace SixLabors.ImageSharp.MetaData.Profiles.Icc
value = value.Substring(0, Math.Min(length - lengthAdjust, value.Length));
- byte[] textData = AsciiEncoding.GetBytes(value);
+ byte[] textData = Encoding.ASCII.GetBytes(value);
int actualLength = Math.Min(length - lengthAdjust, textData.Length);
this.dataStream.Write(textData, 0, actualLength);
for (int i = 0; i < length - actualLength; i++)
diff --git a/src/ImageSharp/MetaData/Profiles/ICC/DataWriter/IccDataWriter.cs b/src/ImageSharp/MetaData/Profiles/ICC/DataWriter/IccDataWriter.cs
index f6ce408264..e509f67d72 100644
--- a/src/ImageSharp/MetaData/Profiles/ICC/DataWriter/IccDataWriter.cs
+++ b/src/ImageSharp/MetaData/Profiles/ICC/DataWriter/IccDataWriter.cs
@@ -3,7 +3,6 @@
using System;
using System.IO;
-using System.Text;
namespace SixLabors.ImageSharp.MetaData.Profiles.Icc
{
@@ -13,7 +12,6 @@ namespace SixLabors.ImageSharp.MetaData.Profiles.Icc
internal sealed partial class IccDataWriter : IDisposable
{
private static readonly bool IsLittleEndian = BitConverter.IsLittleEndian;
- private static readonly Encoding AsciiEncoding = Encoding.ASCII;
///
/// The underlying stream where the data is written to
diff --git a/src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccDataTagDataEntry.cs b/src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccDataTagDataEntry.cs
index f4704680e1..4510882904 100644
--- a/src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccDataTagDataEntry.cs
+++ b/src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccDataTagDataEntry.cs
@@ -12,8 +12,6 @@ namespace SixLabors.ImageSharp.MetaData.Profiles.Icc
///
internal sealed class IccDataTagDataEntry : IccTagDataEntry, IEquatable
{
- private static readonly Encoding AsciiEncoding = Encoding.ASCII;
-
///
/// Initializes a new instance of the class.
///
@@ -60,7 +58,7 @@ namespace SixLabors.ImageSharp.MetaData.Profiles.Icc
/// Gets the decoded as 7bit ASCII.
/// If is false, returns null
///
- public string AsciiString => this.IsAscii ? AsciiEncoding.GetString(this.Data, 0, this.Data.Length) : null;
+ public string AsciiString => this.IsAscii ? Encoding.ASCII.GetString(this.Data, 0, this.Data.Length) : null;
///
public override bool Equals(IccTagDataEntry other)