Skip to content

Commit a744f93

Browse files
Update Rgb.cs
1 parent 74d475d commit a744f93

File tree

1 file changed

+3
-3
lines changed
  • src/ImageSharp/ColorProfiles

1 file changed

+3
-3
lines changed

src/ImageSharp/ColorProfiles/Rgb.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ public static Rgb FromScaledVector4(Vector4 source)
9898
/// <returns>The <see cref="Vector4"/>.</returns>
9999
[MethodImpl(MethodImplOptions.AggressiveInlining)]
100100
public Vector4 ToScaledVector4()
101-
=> new(this.ToScaledVector3(), 1F);
101+
=> new(this.AsVector3Unsafe(), 1F);
102102

103103
/// <inheritdoc/>
104104
public static void ToScaledVector4(ReadOnlySpan<Rgb> source, Span<Vector4> destination)
@@ -154,7 +154,7 @@ public CieXyz ToProfileConnectingSpace(ColorConversionOptions options)
154154
Rgb linear = FromScaledVector4(options.SourceRgbWorkingSpace.Expand(this.ToScaledVector4()));
155155

156156
// Then convert to xyz
157-
return new CieXyz(Vector3.Transform(linear.ToScaledVector3(), GetRgbToCieXyzMatrix(options.SourceRgbWorkingSpace)));
157+
return new CieXyz(Vector3.Transform(linear.AsVector3Unsafe(), GetRgbToCieXyzMatrix(options.SourceRgbWorkingSpace)));
158158
}
159159

160160
/// <inheritdoc/>
@@ -171,7 +171,7 @@ public static void ToProfileConnectionSpace(ColorConversionOptions options, Read
171171
Rgb linear = FromScaledVector4(options.SourceRgbWorkingSpace.Expand(rgb.ToScaledVector4()));
172172

173173
// Then convert to xyz
174-
destination[i] = new CieXyz(Vector3.Transform(linear.ToScaledVector3(), matrix));
174+
destination[i] = new CieXyz(Vector3.Transform(linear.AsVector3Unsafe(), matrix));
175175
}
176176
}
177177

0 commit comments

Comments
 (0)