diff --git a/src/ImageSharp/MetaData/Profiles/ICC/Curves/IccFormulaCurveElement.cs b/src/ImageSharp/MetaData/Profiles/ICC/Curves/IccFormulaCurveElement.cs index 2b0dc9657..ad03c8ff8 100644 --- a/src/ImageSharp/MetaData/Profiles/ICC/Curves/IccFormulaCurveElement.cs +++ b/src/ImageSharp/MetaData/Profiles/ICC/Curves/IccFormulaCurveElement.cs @@ -22,7 +22,7 @@ namespace ImageSharp /// C segment parameter /// D segment parameter /// E segment parameter - public IccFormulaCurveElement(IccFormulaCurveType type, double gamma, double a, double b, double c, double d, double e) + public IccFormulaCurveElement(IccFormulaCurveType type, float gamma, float a, float b, float c, float d, float e) : base(IccCurveSegmentSignature.FormulaCurve) { this.Type = type; @@ -42,32 +42,32 @@ namespace ImageSharp /// /// Gets the gamma curve parameter /// - public double Gamma { get; } + public float Gamma { get; } /// /// Gets the A curve parameter /// - public double A { get; } + public float A { get; } /// /// Gets the B curve parameter /// - public double B { get; } + public float B { get; } /// /// Gets the C curve parameter /// - public double C { get; } + public float C { get; } /// /// Gets the D curve parameter /// - public double D { get; } + public float D { get; } /// /// Gets the E curve parameter /// - public double E { get; } + public float E { get; } /// public override bool Equals(IccCurveSegment other) diff --git a/src/ImageSharp/MetaData/Profiles/ICC/Curves/IccParametricCurve.cs b/src/ImageSharp/MetaData/Profiles/ICC/Curves/IccParametricCurve.cs index d3bd33139..b36185e13 100644 --- a/src/ImageSharp/MetaData/Profiles/ICC/Curves/IccParametricCurve.cs +++ b/src/ImageSharp/MetaData/Profiles/ICC/Curves/IccParametricCurve.cs @@ -16,7 +16,7 @@ namespace ImageSharp /// Initializes a new instance of the class. /// /// G curve parameter - public IccParametricCurve(double g) + public IccParametricCurve(float g) : this(IccParametricCurveType.Type1, g, 0, 0, 0, 0, 0, 0) { } @@ -27,7 +27,7 @@ namespace ImageSharp /// G curve parameter /// A curve parameter /// B curve parameter - public IccParametricCurve(double g, double a, double b) + public IccParametricCurve(float g, float a, float b) : this(IccParametricCurveType.Cie122_1996, g, a, b, 0, 0, 0, 0) { } @@ -39,7 +39,7 @@ namespace ImageSharp /// A curve parameter /// B curve parameter /// C curve parameter - public IccParametricCurve(double g, double a, double b, double c) + public IccParametricCurve(float g, float a, float b, float c) : this(IccParametricCurveType.Iec61966_3, g, a, b, c, 0, 0, 0) { } @@ -52,7 +52,7 @@ namespace ImageSharp /// B curve parameter /// C curve parameter /// D curve parameter - public IccParametricCurve(double g, double a, double b, double c, double d) + public IccParametricCurve(float g, float a, float b, float c, float d) : this(IccParametricCurveType.SRgb, g, a, b, c, d, 0, 0) { } @@ -67,12 +67,12 @@ namespace ImageSharp /// D curve parameter /// E curve parameter /// F curve parameter - public IccParametricCurve(double g, double a, double b, double c, double d, double e, double f) + public IccParametricCurve(float g, float a, float b, float c, float d, float e, float f) : this(IccParametricCurveType.Type5, g, a, b, c, d, e, f) { } - private IccParametricCurve(IccParametricCurveType type, double g, double a, double b, double c, double d, double e, double f) + private IccParametricCurve(IccParametricCurveType type, float g, float a, float b, float c, float d, float e, float f) { this.Type = type; this.G = g; @@ -92,37 +92,37 @@ namespace ImageSharp /// /// Gets the G curve parameter /// - public double G { get; } + public float G { get; } /// /// Gets the A curve parameter /// - public double A { get; } + public float A { get; } /// /// Gets the B curve parameter /// - public double B { get; } + public float B { get; } /// /// Gets the C curve parameter /// - public double C { get; } + public float C { get; } /// /// Gets the D curve parameter /// - public double D { get; } + public float D { get; } /// /// Gets the E curve parameter /// - public double E { get; } + public float E { get; } /// /// Gets the F curve parameter /// - public double F { get; } + public float F { get; } /// public bool Equals(IccParametricCurve other) diff --git a/src/ImageSharp/MetaData/Profiles/ICC/DataReader/IccDataReader.Curves.cs b/src/ImageSharp/MetaData/Profiles/ICC/DataReader/IccDataReader.Curves.cs index e9b20414c..b8daeaac0 100644 --- a/src/ImageSharp/MetaData/Profiles/ICC/DataReader/IccDataReader.Curves.cs +++ b/src/ImageSharp/MetaData/Profiles/ICC/DataReader/IccDataReader.Curves.cs @@ -76,7 +76,7 @@ namespace ImageSharp { ushort type = this.ReadUInt16(); this.AddIndex(2); // 2 bytes reserved - double gamma, a, b, c, d, e, f; + float gamma, a, b, c, d, e, f; gamma = a = b = c = d = e = f = 0; if (type >= 0 && type <= 4) @@ -145,7 +145,7 @@ namespace ImageSharp { IccFormulaCurveType type = (IccFormulaCurveType)this.ReadUInt16(); this.AddIndex(2); // 2 bytes reserved - double gamma, a, b, c, d, e; + float gamma, a, b, c, d, e; gamma = a = b = c = d = e = 0; if (type == IccFormulaCurveType.Type1 || type == IccFormulaCurveType.Type2)