diff --git a/src/ImageSharp/ColorProfiles/ColorProfileConverterExtensionsIcc.cs b/src/ImageSharp/ColorProfiles/ColorProfileConverterExtensionsIcc.cs
index 22c31e26b..b19133789 100644
--- a/src/ImageSharp/ColorProfiles/ColorProfileConverterExtensionsIcc.cs
+++ b/src/ImageSharp/ColorProfiles/ColorProfileConverterExtensionsIcc.cs
@@ -244,6 +244,11 @@ internal static class ColorProfileConverterExtensionsIcc
/// Not required if both spaces need adjustment, since they both have the same understanding of the PCS.
/// Not compatible with PCS adjustment for absolute intent.
///
+ /// The source PCS values.
+ /// The source profile parameters.
+ /// The target profile parameters.
+ /// The converter to use for the PCS adjustments.
+ /// Thrown when the source or target PCS is not supported.
private static Vector4 GetTargetPcsWithPerceptualV2Adjustment(
Vector4 sourcePcs,
ConversionParams sourceParams,
@@ -294,16 +299,12 @@ internal static class ColorProfileConverterExtensionsIcc
case IccColorSpaceType.CieLab:
CieLab lab = pcsConverter.Convert(in xyz);
targetPcs = lab.ToScaledVector4();
- targetPcs = targetParams.Is16BitLutEntry ? LabToLabV2(targetPcs) : targetPcs;
- break;
+ return targetParams.Is16BitLutEntry ? LabToLabV2(targetPcs) : targetPcs;
case IccColorSpaceType.CieXyz:
- targetPcs = xyz.ToScaledVector4();
- break;
+ return xyz.ToScaledVector4();
default:
throw new ArgumentOutOfRangeException($"Target PCS {targetParams.PcsType} is not supported");
}
-
- return targetPcs;
}
// as per DemoIccMAX icPerceptual values in IccCmm.h
diff --git a/src/ImageSharp/ColorProfiles/Icc/Calculators/ColorTrcCalculator.cs b/src/ImageSharp/ColorProfiles/Icc/Calculators/ColorTrcCalculator.cs
index c7028af5c..ecd9a6f50 100644
--- a/src/ImageSharp/ColorProfiles/Icc/Calculators/ColorTrcCalculator.cs
+++ b/src/ImageSharp/ColorProfiles/Icc/Calculators/ColorTrcCalculator.cs
@@ -23,7 +23,7 @@ internal class ColorTrcCalculator : IVector4Calculator
bool toPcs)
{
this.toPcs = toPcs;
- this.curveCalculator = new TrcCalculator(new IccTagDataEntry[] { redTrc, greenTrc, blueTrc }, !toPcs);
+ this.curveCalculator = new TrcCalculator([redTrc, greenTrc, blueTrc], !toPcs);
Vector3 mr = redMatrixColumn.Data[0];
Vector3 mg = greenMatrixColumn.Data[0];