Skip to content

Commit a2d7667

Browse files
committed
优化代码写法
1 parent 4735e26 commit a2d7667

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

src/MediaConverters/MediaConverters.Lib/Imaging/Effect/Color/ColorMatrices.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,13 @@ public static class ColorMatrices
2121
/// <param name="color">颜色</param>
2222
/// <param name="m">颜色处理矩阵.</param>
2323
/// <returns>处理后的颜色</returns>
24-
public static ColorMetadata ApplyMatrix(ColorMetadata color, in ColorMatrix5x5 m)
24+
public static ColorMetadata ApplyMatrix(in ColorMetadata color, in ColorMatrix m)
2525
{
2626
// 应用颜色转换矩阵将RGB颜色转换为新颜色
27-
var r = color.ARGB.Item1;
28-
var g = color.ARGB.Item2;
29-
var b = color.ARGB.Item3;
30-
var a = color.ARGB.Item4;
27+
var r = color.ARGB.R;
28+
var g = color.ARGB.G;
29+
var b = color.ARGB.B;
30+
var a = color.ARGB.A;
3131
var w = 1.0f;
3232
Span<float> newColor =
3333
[

0 commit comments

Comments
 (0)