|
|
@ -138,23 +138,12 @@ namespace SixLabors.ImageSharp.Tests.Processing.Processors.Convolution |
|
|
public void BokehBlurFilterProcessor<TPixel>(TestImageProvider<TPixel> provider, BokehBlurInfo value) |
|
|
public void BokehBlurFilterProcessor<TPixel>(TestImageProvider<TPixel> provider, BokehBlurInfo value) |
|
|
where TPixel : unmanaged, IPixel<TPixel> |
|
|
where TPixel : unmanaged, IPixel<TPixel> |
|
|
{ |
|
|
{ |
|
|
static void RunTest(string providerDump, string infoDump) |
|
|
|
|
|
{ |
|
|
|
|
|
TestImageProvider<TPixel> provider = |
|
|
|
|
|
BasicSerializer.Deserialize<TestImageProvider<TPixel>>(providerDump); |
|
|
|
|
|
BokehBlurInfo value = BasicSerializer.Deserialize<BokehBlurInfo>(infoDump); |
|
|
|
|
|
|
|
|
|
|
|
provider.RunValidatingProcessorTest( |
|
|
provider.RunValidatingProcessorTest( |
|
|
x => x.BokehBlur(value.Radius, value.Components, value.Gamma), |
|
|
x => x.BokehBlur(value.Radius, value.Components, value.Gamma), |
|
|
testOutputDetails: value.ToString(), |
|
|
testOutputDetails: value.ToString(), |
|
|
appendPixelTypeToFileName: false); |
|
|
appendPixelTypeToFileName: false); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
RemoteExecutor |
|
|
|
|
|
.Invoke(RunTest, BasicSerializer.Serialize(provider), BasicSerializer.Serialize(value)) |
|
|
|
|
|
.Dispose(); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
[Theory] |
|
|
[Theory] |
|
|
/* |
|
|
/* |
|
|
TODO: Re-enable L8 when we update the reference images. |
|
|
TODO: Re-enable L8 when we update the reference images. |
|
|
@ -164,31 +153,16 @@ namespace SixLabors.ImageSharp.Tests.Processing.Processors.Convolution |
|
|
public void BokehBlurFilterProcessor_WorksWithAllPixelTypes<TPixel>(TestImageProvider<TPixel> provider) |
|
|
public void BokehBlurFilterProcessor_WorksWithAllPixelTypes<TPixel>(TestImageProvider<TPixel> provider) |
|
|
where TPixel : unmanaged, IPixel<TPixel> |
|
|
where TPixel : unmanaged, IPixel<TPixel> |
|
|
{ |
|
|
{ |
|
|
static void RunTest(string providerDump) |
|
|
|
|
|
{ |
|
|
|
|
|
TestImageProvider<TPixel> provider = |
|
|
|
|
|
BasicSerializer.Deserialize<TestImageProvider<TPixel>>(providerDump); |
|
|
|
|
|
provider.RunValidatingProcessorTest( |
|
|
provider.RunValidatingProcessorTest( |
|
|
x => x.BokehBlur(8, 2, 3), |
|
|
x => x.BokehBlur(8, 2, 3), |
|
|
appendSourceFileOrDescription: false); |
|
|
appendSourceFileOrDescription: false); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
RemoteExecutor |
|
|
|
|
|
.Invoke(RunTest, BasicSerializer.Serialize(provider)) |
|
|
|
|
|
.Dispose(); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
[Theory] |
|
|
[Theory] |
|
|
[WithFileCollection(nameof(TestFiles), nameof(BokehBlurValues), PixelTypes.Rgba32)] |
|
|
[WithFileCollection(nameof(TestFiles), nameof(BokehBlurValues), PixelTypes.Rgba32)] |
|
|
public void BokehBlurFilterProcessor_Bounded<TPixel>(TestImageProvider<TPixel> provider, BokehBlurInfo value) |
|
|
public void BokehBlurFilterProcessor_Bounded<TPixel>(TestImageProvider<TPixel> provider, BokehBlurInfo value) |
|
|
where TPixel : unmanaged, IPixel<TPixel> |
|
|
where TPixel : unmanaged, IPixel<TPixel> |
|
|
{ |
|
|
{ |
|
|
static void RunTest(string providerDump, string infoDump) |
|
|
|
|
|
{ |
|
|
|
|
|
TestImageProvider<TPixel> provider = |
|
|
|
|
|
BasicSerializer.Deserialize<TestImageProvider<TPixel>>(providerDump); |
|
|
|
|
|
BokehBlurInfo value = BasicSerializer.Deserialize<BokehBlurInfo>(infoDump); |
|
|
|
|
|
|
|
|
|
|
|
provider.RunValidatingProcessorTest( |
|
|
provider.RunValidatingProcessorTest( |
|
|
x => |
|
|
x => |
|
|
{ |
|
|
{ |
|
|
@ -200,11 +174,6 @@ namespace SixLabors.ImageSharp.Tests.Processing.Processors.Convolution |
|
|
appendPixelTypeToFileName: false); |
|
|
appendPixelTypeToFileName: false); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
RemoteExecutor |
|
|
|
|
|
.Invoke(RunTest, BasicSerializer.Serialize(provider), BasicSerializer.Serialize(value)) |
|
|
|
|
|
.Dispose(); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
[Theory] |
|
|
[Theory] |
|
|
[WithTestPatternImages(100, 300, PixelTypes.Bgr24)] |
|
|
[WithTestPatternImages(100, 300, PixelTypes.Bgr24)] |
|
|
public void WorksWithDiscoBuffers<TPixel>(TestImageProvider<TPixel> provider) |
|
|
public void WorksWithDiscoBuffers<TPixel>(TestImageProvider<TPixel> provider) |
|
|
|