|
|
@ -4,31 +4,31 @@ |
|
|
using System.Numerics; |
|
|
using System.Numerics; |
|
|
using SixLabors.ImageSharp.Metadata.Profiles.Icc; |
|
|
using SixLabors.ImageSharp.Metadata.Profiles.Icc; |
|
|
|
|
|
|
|
|
namespace SixLabors.ImageSharp.Tests.TestDataIcc.Conversion |
|
|
namespace SixLabors.ImageSharp.Tests.TestDataIcc.Conversion; |
|
|
{ |
|
|
|
|
|
public class IccConversionDataLutEntry |
|
|
public class IccConversionDataLutEntry |
|
|
{ |
|
|
{ |
|
|
private static readonly IccLut Lut256 = CreateLut(256); |
|
|
private static readonly IccLut Lut256 = CreateLut(256); |
|
|
private static readonly IccLut Lut32 = CreateLut(32); |
|
|
private static readonly IccLut Lut32 = CreateLut(32); |
|
|
private static readonly IccLut LutIdentity = CreateIdentityLut(0, 1); |
|
|
private static readonly IccLut LutIdentity = CreateIdentityLut(0, 1); |
|
|
|
|
|
|
|
|
private static readonly IccLut8TagDataEntry Lut8 = new IccLut8TagDataEntry( |
|
|
private static readonly IccLut8TagDataEntry Lut8 = new( |
|
|
new[] { Lut256, Lut256 }, |
|
|
new[] { Lut256, Lut256 }, |
|
|
IccConversionDataClut.Clut2x1, |
|
|
IccConversionDataClut.Clut2x1, |
|
|
new[] { Lut256 }); |
|
|
new[] { Lut256 }); |
|
|
|
|
|
|
|
|
private static readonly IccLut16TagDataEntry Lut16 = new IccLut16TagDataEntry( |
|
|
private static readonly IccLut16TagDataEntry Lut16 = new( |
|
|
new[] { Lut32, Lut32 }, |
|
|
new[] { Lut32, Lut32 }, |
|
|
IccConversionDataClut.Clut2x1, |
|
|
IccConversionDataClut.Clut2x1, |
|
|
new[] { LutIdentity }); |
|
|
new[] { LutIdentity }); |
|
|
|
|
|
|
|
|
private static readonly IccLut8TagDataEntry Lut8Matrix = new IccLut8TagDataEntry( |
|
|
private static readonly IccLut8TagDataEntry Lut8Matrix = new( |
|
|
IccConversionDataMatrix.Matrix3x3Random, |
|
|
IccConversionDataMatrix.Matrix3x3Random, |
|
|
new[] { Lut256, Lut256, Lut256 }, |
|
|
new[] { Lut256, Lut256, Lut256 }, |
|
|
IccConversionDataClut.Clut3x1, |
|
|
IccConversionDataClut.Clut3x1, |
|
|
new[] { Lut256 }); |
|
|
new[] { Lut256 }); |
|
|
|
|
|
|
|
|
private static readonly IccLut16TagDataEntry Lut16Matrix = new IccLut16TagDataEntry( |
|
|
private static readonly IccLut16TagDataEntry Lut16Matrix = new( |
|
|
IccConversionDataMatrix.Matrix3x3Random, |
|
|
IccConversionDataMatrix.Matrix3x3Random, |
|
|
new[] { Lut32, Lut32, Lut32 }, |
|
|
new[] { Lut32, Lut32, Lut32 }, |
|
|
IccConversionDataClut.Clut3x1, |
|
|
IccConversionDataClut.Clut3x1, |
|
|
@ -45,7 +45,7 @@ namespace SixLabors.ImageSharp.Tests.TestDataIcc.Conversion |
|
|
return new IccLut(values); |
|
|
return new IccLut(values); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
private static IccLut CreateIdentityLut(float min, float max) => new IccLut(new[] { min, max }); |
|
|
private static IccLut CreateIdentityLut(float min, float max) => new(new[] { min, max }); |
|
|
|
|
|
|
|
|
public static object[][] Lut8ConversionTestData = |
|
|
public static object[][] Lut8ConversionTestData = |
|
|
{ |
|
|
{ |
|
|
@ -59,4 +59,3 @@ namespace SixLabors.ImageSharp.Tests.TestDataIcc.Conversion |
|
|
new object[] { Lut16Matrix, new Vector4(0.21f, 0.31f, 0.41f, 0), new Vector4(0.336980581f, 0, 0, 0) }, |
|
|
new object[] { Lut16Matrix, new Vector4(0.21f, 0.31f, 0.41f, 0), new Vector4(0.336980581f, 0, 0, 0) }, |
|
|
}; |
|
|
}; |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|