|
|
|
@ -1,6 +1,7 @@ |
|
|
|
// 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; |
|
|
|
@ -125,5 +126,20 @@ 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(); |
|
|
|
}); |
|
|
|
|
|
|
|
Assert.Null(exception); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|