From 098a4ae7c000268719bc70975aa0b28b19611ff1 Mon Sep 17 00:00:00 2001 From: Brian Popow Date: Fri, 2 Sep 2022 12:16:07 +0200 Subject: [PATCH] Compare Issue 2217 to reference output --- .../Binarization/AdaptiveThresholdTests.cs | 19 +------------------ ..._Issue_2217_AdaptiveThresholdProcessor.png | 3 +++ 2 files changed, 4 insertions(+), 18 deletions(-) create mode 100644 tests/Images/External/ReferenceOutput/AdaptiveThresholdTests/AdaptiveThreshold_Works_Rgba32_Issue_2217_AdaptiveThresholdProcessor.png diff --git a/tests/ImageSharp.Tests/Processing/Binarization/AdaptiveThresholdTests.cs b/tests/ImageSharp.Tests/Processing/Binarization/AdaptiveThresholdTests.cs index 6f4214c14..e9304299d 100644 --- a/tests/ImageSharp.Tests/Processing/Binarization/AdaptiveThresholdTests.cs +++ b/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(TestImageProvider provider) where TPixel : unmanaged, IPixel { @@ -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( - TestImageProvider provider) - where TPixel : unmanaged, IPixel - { - Exception exception = Record.Exception(() => - { - using Image image = provider.GetImage(); - image.Mutate(img => img.AdaptiveThreshold()); - image.DebugSave(provider); - }); - - Assert.Null(exception); - } } } diff --git a/tests/Images/External/ReferenceOutput/AdaptiveThresholdTests/AdaptiveThreshold_Works_Rgba32_Issue_2217_AdaptiveThresholdProcessor.png b/tests/Images/External/ReferenceOutput/AdaptiveThresholdTests/AdaptiveThreshold_Works_Rgba32_Issue_2217_AdaptiveThresholdProcessor.png new file mode 100644 index 000000000..046dec8e5 --- /dev/null +++ b/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