@ -27,6 +27,8 @@ namespace SixLabors.ImageSharp.Processing.Processors.Dithering
[MethodImpl(InliningOptions.ShortMethod)]
public ErrorDither(in DenseMatrix<float> matrix, int offset)
{
Guard.MustBeGreaterThan(offset, 0, nameof(offset));
this.matrix = matrix;
this.offset = offset;
}
@ -24,6 +24,8 @@ namespace SixLabors.ImageSharp.Processing.Processors.Dithering
public OrderedDither(uint length)
Guard.MustBeGreaterThan(length, 0, nameof(length));
DenseMatrix<uint> ditherMatrix = OrderedDitherFactory.CreateDitherMatrix(length);
// Create a new matrix to run against, that pre-thresholds the values.