diff --git a/tests/ImageSharp.Tests/Processing/Processors/Quantization/QuantizerTests.cs b/tests/ImageSharp.Tests/Processing/Processors/Quantization/QuantizerTests.cs index d3e8b034b..007d84449 100644 --- a/tests/ImageSharp.Tests/Processing/Processors/Quantization/QuantizerTests.cs +++ b/tests/ImageSharp.Tests/Processing/Processors/Quantization/QuantizerTests.cs @@ -141,7 +141,7 @@ namespace SixLabors.ImageSharp.Tests.Processing.Processors.Quantization new WuQuantizer(OrderedDitherOptions), }; - private static readonly ImageComparer ValidatorComparer = ImageComparer.TolerantPercentage(0.05f); + private static readonly ImageComparer ValidatorComparer = GetComparer(); [Theory] [WithFileCollection(nameof(CommonTestImages), nameof(Quantizers), PixelTypes.Rgba32)] @@ -194,5 +194,16 @@ namespace SixLabors.ImageSharp.Tests.Processing.Processors.Quantization testOutputDetails: testOutputDetails, appendPixelTypeToFileName: false); } + + private static ImageComparer GetComparer() + { + // Net Framework on the CI produces different results than the Core output. + if (TestEnvironment.RunsOnCI && string.IsNullOrEmpty(TestEnvironment.NetCoreVersion)) + { + ImageComparer.TolerantPercentage(1.5F); + } + + return ImageComparer.TolerantPercentage(0.05F); + } } }