Browse Source

Compare Issue 2217 to reference output

pull/2221/head
Brian Popow 3 years ago
parent
commit
098a4ae7c0
  1. 19
      tests/ImageSharp.Tests/Processing/Binarization/AdaptiveThresholdTests.cs
  2. 3
      tests/Images/External/ReferenceOutput/AdaptiveThresholdTests/AdaptiveThreshold_Works_Rgba32_Issue_2217_AdaptiveThresholdProcessor.png

19
tests/ImageSharp.Tests/Processing/Binarization/AdaptiveThresholdTests.cs

@ -1,7 +1,6 @@
// Copyright (c) Six Labors.
// Licensed under the Six Labors Split License.
using System;
using SixLabors.ImageSharp.PixelFormats;
using SixLabors.ImageSharp.Processing;
using SixLabors.ImageSharp.Processing.Processors.Binarization;
@ -103,6 +102,7 @@ namespace SixLabors.ImageSharp.Tests.Processing.Binarization
[WithFile(TestImages.Png.Bradley01, PixelTypes.Rgba32)]
[WithFile(TestImages.Png.Bradley02, PixelTypes.Rgba32)]
[WithFile(TestImages.Png.Ducky, PixelTypes.Rgba32)]
[WithFile(TestImages.Png.Issue2217, PixelTypes.Rgba32)]
public void AdaptiveThreshold_Works<TPixel>(TestImageProvider<TPixel> provider)
where TPixel : unmanaged, IPixel<TPixel>
{
@ -126,22 +126,5 @@ namespace SixLabors.ImageSharp.Tests.Processing.Binarization
image.CompareToReferenceOutput(ImageComparer.Exact, provider);
}
}
// https://github.com/SixLabors/ImageSharp/issues/2217
[Theory]
[WithFile(TestImages.Png.Issue2217, PixelTypes.Rgba32)]
public void Issue_2217_AdaptiveThreshold_DoesNotThrowIndexOutOfRangeException<TPixel>(
TestImageProvider<TPixel> provider)
where TPixel : unmanaged, IPixel<TPixel>
{
Exception exception = Record.Exception(() =>
{
using Image<TPixel> image = provider.GetImage();
image.Mutate(img => img.AdaptiveThreshold());
image.DebugSave(provider);
});
Assert.Null(exception);
}
}
}

3
tests/Images/External/ReferenceOutput/AdaptiveThresholdTests/AdaptiveThreshold_Works_Rgba32_Issue_2217_AdaptiveThresholdProcessor.png

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:b9e47d328e9d6d37a5bf090d2f8d748b80d78be936df06f4b3afec0fd9712f39
size 412
Loading…
Cancel
Save