diff --git a/src/ImageSharp/Dithering/ErrorDiffusion/AtkinsonDiffuser.cs b/src/ImageSharp/Dithering/ErrorDiffusion/AtkinsonDiffuser.cs
index ae3b653e10..3899b14cc9 100644
--- a/src/ImageSharp/Dithering/ErrorDiffusion/AtkinsonDiffuser.cs
+++ b/src/ImageSharp/Dithering/ErrorDiffusion/AtkinsonDiffuser.cs
@@ -1,6 +1,7 @@
// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
+using SixLabors.ImageSharp.Dithering.Base;
using SixLabors.ImageSharp.Memory;
namespace SixLabors.ImageSharp.Dithering
@@ -9,7 +10,7 @@ namespace SixLabors.ImageSharp.Dithering
/// Applies error diffusion based dithering using the Atkinson image dithering algorithm.
///
///
- public sealed class AtkinsonDiffuser : ErrorDiffuser
+ public sealed class AtkinsonDiffuser : ErrorDiffuserBase
{
///
/// The diffusion matrix
diff --git a/src/ImageSharp/Dithering/ErrorDiffusion/BurksDiffuser.cs b/src/ImageSharp/Dithering/ErrorDiffusion/BurksDiffuser.cs
index 24854da451..4d9f4d3c4f 100644
--- a/src/ImageSharp/Dithering/ErrorDiffusion/BurksDiffuser.cs
+++ b/src/ImageSharp/Dithering/ErrorDiffusion/BurksDiffuser.cs
@@ -1,6 +1,7 @@
// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
+using SixLabors.ImageSharp.Dithering.Base;
using SixLabors.ImageSharp.Memory;
namespace SixLabors.ImageSharp.Dithering
@@ -9,7 +10,7 @@ namespace SixLabors.ImageSharp.Dithering
/// Applies error diffusion based dithering using the Burks image dithering algorithm.
///
///
- public sealed class BurksDiffuser : ErrorDiffuser
+ public sealed class BurksDiffuser : ErrorDiffuserBase
{
///
/// The diffusion matrix
diff --git a/src/ImageSharp/Dithering/ErrorDiffusion/ErrorDiffuser.cs b/src/ImageSharp/Dithering/ErrorDiffusion/ErrorDiffuserBase.cs
similarity index 95%
rename from src/ImageSharp/Dithering/ErrorDiffusion/ErrorDiffuser.cs
rename to src/ImageSharp/Dithering/ErrorDiffusion/ErrorDiffuserBase.cs
index 7a225e1d01..36029335ce 100644
--- a/src/ImageSharp/Dithering/ErrorDiffusion/ErrorDiffuser.cs
+++ b/src/ImageSharp/Dithering/ErrorDiffusion/ErrorDiffuserBase.cs
@@ -7,12 +7,12 @@ using System.Runtime.CompilerServices;
using SixLabors.ImageSharp.Memory;
using SixLabors.ImageSharp.PixelFormats;
-namespace SixLabors.ImageSharp.Dithering
+namespace SixLabors.ImageSharp.Dithering.Base
{
///
/// The base class for performing error diffusion based dithering.
///
- public abstract class ErrorDiffuser : IErrorDiffuser
+ public abstract class ErrorDiffuserBase : IErrorDiffuser
{
///
/// The vector to perform division.
@@ -40,11 +40,11 @@ namespace SixLabors.ImageSharp.Dithering
private readonly Fast2DArray matrix;
///
- /// Initializes a new instance of the class.
+ /// Initializes a new instance of the class.
///
/// The dithering matrix.
/// The divisor.
- internal ErrorDiffuser(Fast2DArray matrix, byte divisor)
+ internal ErrorDiffuserBase(Fast2DArray matrix, byte divisor)
{
Guard.NotNull(matrix, nameof(matrix));
Guard.MustBeGreaterThan(divisor, 0, nameof(divisor));
diff --git a/src/ImageSharp/Dithering/ErrorDiffusion/FloydSteinbergDiffuser.cs b/src/ImageSharp/Dithering/ErrorDiffusion/FloydSteinbergDiffuser.cs
index fdff5ec13e..6457fbe01e 100644
--- a/src/ImageSharp/Dithering/ErrorDiffusion/FloydSteinbergDiffuser.cs
+++ b/src/ImageSharp/Dithering/ErrorDiffusion/FloydSteinbergDiffuser.cs
@@ -1,6 +1,7 @@
// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
+using SixLabors.ImageSharp.Dithering.Base;
using SixLabors.ImageSharp.Memory;
namespace SixLabors.ImageSharp.Dithering
@@ -9,7 +10,7 @@ namespace SixLabors.ImageSharp.Dithering
/// Applies error diffusion based dithering using the Floyd–Steinberg image dithering algorithm.
///
///
- public sealed class FloydSteinbergDiffuser : ErrorDiffuser
+ public sealed class FloydSteinbergDiffuser : ErrorDiffuserBase
{
///
/// The diffusion matrix
diff --git a/src/ImageSharp/Dithering/ErrorDiffusion/JarvisJudiceNinkeDiffuser.cs b/src/ImageSharp/Dithering/ErrorDiffusion/JarvisJudiceNinkeDiffuser.cs
index e9c129efc1..30e09b47a9 100644
--- a/src/ImageSharp/Dithering/ErrorDiffusion/JarvisJudiceNinkeDiffuser.cs
+++ b/src/ImageSharp/Dithering/ErrorDiffusion/JarvisJudiceNinkeDiffuser.cs
@@ -1,6 +1,7 @@
// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
+using SixLabors.ImageSharp.Dithering.Base;
using SixLabors.ImageSharp.Memory;
namespace SixLabors.ImageSharp.Dithering
@@ -9,7 +10,7 @@ namespace SixLabors.ImageSharp.Dithering
/// Applies error diffusion based dithering using the JarvisJudiceNinke image dithering algorithm.
///
///
- public sealed class JarvisJudiceNinkeDiffuser : ErrorDiffuser
+ public sealed class JarvisJudiceNinkeDiffuser : ErrorDiffuserBase
{
///
/// The diffusion matrix
diff --git a/src/ImageSharp/Dithering/ErrorDiffusion/Sierra2Diffuser.cs b/src/ImageSharp/Dithering/ErrorDiffusion/Sierra2Diffuser.cs
index ab1e58f6d2..c472d25b0d 100644
--- a/src/ImageSharp/Dithering/ErrorDiffusion/Sierra2Diffuser.cs
+++ b/src/ImageSharp/Dithering/ErrorDiffusion/Sierra2Diffuser.cs
@@ -1,6 +1,7 @@
// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
+using SixLabors.ImageSharp.Dithering.Base;
using SixLabors.ImageSharp.Memory;
namespace SixLabors.ImageSharp.Dithering
@@ -9,7 +10,7 @@ namespace SixLabors.ImageSharp.Dithering
/// Applies error diffusion based dithering using the Sierra2 image dithering algorithm.
///
///
- public sealed class Sierra2Diffuser : ErrorDiffuser
+ public sealed class Sierra2Diffuser : ErrorDiffuserBase
{
///
/// The diffusion matrix
diff --git a/src/ImageSharp/Dithering/ErrorDiffusion/Sierra3Diffuser.cs b/src/ImageSharp/Dithering/ErrorDiffusion/Sierra3Diffuser.cs
index 231170b38a..c19ab2aaac 100644
--- a/src/ImageSharp/Dithering/ErrorDiffusion/Sierra3Diffuser.cs
+++ b/src/ImageSharp/Dithering/ErrorDiffusion/Sierra3Diffuser.cs
@@ -1,6 +1,7 @@
// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
+using SixLabors.ImageSharp.Dithering.Base;
using SixLabors.ImageSharp.Memory;
namespace SixLabors.ImageSharp.Dithering
@@ -9,7 +10,7 @@ namespace SixLabors.ImageSharp.Dithering
/// Applies error diffusion based dithering using the Sierra3 image dithering algorithm.
///
///
- public sealed class Sierra3Diffuser : ErrorDiffuser
+ public sealed class Sierra3Diffuser : ErrorDiffuserBase
{
///
/// The diffusion matrix
diff --git a/src/ImageSharp/Dithering/ErrorDiffusion/SierraLiteDiffuser.cs b/src/ImageSharp/Dithering/ErrorDiffusion/SierraLiteDiffuser.cs
index f516902d94..263bae568a 100644
--- a/src/ImageSharp/Dithering/ErrorDiffusion/SierraLiteDiffuser.cs
+++ b/src/ImageSharp/Dithering/ErrorDiffusion/SierraLiteDiffuser.cs
@@ -1,6 +1,7 @@
// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
+using SixLabors.ImageSharp.Dithering.Base;
using SixLabors.ImageSharp.Memory;
namespace SixLabors.ImageSharp.Dithering
@@ -9,7 +10,7 @@ namespace SixLabors.ImageSharp.Dithering
/// Applies error diffusion based dithering using the SierraLite image dithering algorithm.
///
///
- public sealed class SierraLiteDiffuser : ErrorDiffuser
+ public sealed class SierraLiteDiffuser : ErrorDiffuserBase
{
///
/// The diffusion matrix
diff --git a/src/ImageSharp/Dithering/ErrorDiffusion/StuckiDiffuser.cs b/src/ImageSharp/Dithering/ErrorDiffusion/StuckiDiffuser.cs
index b1adec4316..0717695065 100644
--- a/src/ImageSharp/Dithering/ErrorDiffusion/StuckiDiffuser.cs
+++ b/src/ImageSharp/Dithering/ErrorDiffusion/StuckiDiffuser.cs
@@ -1,6 +1,7 @@
// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
+using SixLabors.ImageSharp.Dithering.Base;
using SixLabors.ImageSharp.Memory;
namespace SixLabors.ImageSharp.Dithering
@@ -9,7 +10,7 @@ namespace SixLabors.ImageSharp.Dithering
/// Applies error diffusion based dithering using the Stucki image dithering algorithm.
///
///
- public sealed class StuckiDiffuser : ErrorDiffuser
+ public sealed class StuckiDiffuser : ErrorDiffuserBase
{
///
/// The diffusion matrix
diff --git a/src/ImageSharp/Dithering/Ordered/BayerDither.cs b/src/ImageSharp/Dithering/Ordered/BayerDither.cs
index 236992a0ca..685dca5fe8 100644
--- a/src/ImageSharp/Dithering/Ordered/BayerDither.cs
+++ b/src/ImageSharp/Dithering/Ordered/BayerDither.cs
@@ -1,15 +1,16 @@
// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
+using SixLabors.ImageSharp.Dithering.Base;
using SixLabors.ImageSharp.Memory;
-namespace SixLabors.ImageSharp.Dithering.Ordered
+namespace SixLabors.ImageSharp.Dithering
{
///
/// Applies error diffusion based dithering using the 4x4 Bayer dithering matrix.
///
///
- public sealed class BayerDither : OrderedDither4x4
+ public sealed class BayerDither : OrderedDitherBase
{
///
/// The threshold matrix.
diff --git a/src/ImageSharp/Dithering/Ordered/OrderedDither.cs b/src/ImageSharp/Dithering/Ordered/OrderedDither.cs
index 6a27f4c999..12968914d0 100644
--- a/src/ImageSharp/Dithering/Ordered/OrderedDither.cs
+++ b/src/ImageSharp/Dithering/Ordered/OrderedDither.cs
@@ -1,15 +1,16 @@
// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
+using SixLabors.ImageSharp.Dithering.Base;
using SixLabors.ImageSharp.Memory;
-namespace SixLabors.ImageSharp.Dithering.Ordered
+namespace SixLabors.ImageSharp.Dithering
{
///
/// Applies error diffusion based dithering using the 4x4 ordered dithering matrix.
///
///
- public sealed class OrderedDither : OrderedDither4x4
+ public sealed class OrderedDither : OrderedDitherBase
{
///
/// The threshold matrix.
diff --git a/src/ImageSharp/Dithering/Ordered/OrderedDither4x4.cs b/src/ImageSharp/Dithering/Ordered/OrderedDitherBase.cs
similarity index 87%
rename from src/ImageSharp/Dithering/Ordered/OrderedDither4x4.cs
rename to src/ImageSharp/Dithering/Ordered/OrderedDitherBase.cs
index 6be1037138..6fa406bec8 100644
--- a/src/ImageSharp/Dithering/Ordered/OrderedDither4x4.cs
+++ b/src/ImageSharp/Dithering/Ordered/OrderedDitherBase.cs
@@ -4,12 +4,12 @@
using SixLabors.ImageSharp.Memory;
using SixLabors.ImageSharp.PixelFormats;
-namespace SixLabors.ImageSharp.Dithering.Ordered
+namespace SixLabors.ImageSharp.Dithering.Base
{
///
/// The base class for performing ordered ditheroing using a 4x4 matrix.
///
- public abstract class OrderedDither4x4 : IOrderedDither
+ public abstract class OrderedDitherBase : IOrderedDither
{
///
/// The dithering matrix
@@ -17,10 +17,10 @@ namespace SixLabors.ImageSharp.Dithering.Ordered
private Fast2DArray matrix;
///
- /// Initializes a new instance of the class.
+ /// Initializes a new instance of the class.
///
/// The thresholding matrix.
- internal OrderedDither4x4(Fast2DArray matrix)
+ internal OrderedDitherBase(Fast2DArray matrix)
{
this.matrix = matrix;
}
diff --git a/tests/ImageSharp.Tests/Processing/Binarization/DitherTests.cs b/tests/ImageSharp.Tests/Processing/Binarization/DitherTests.cs
index 8aef37d4d1..94241d0071 100644
--- a/tests/ImageSharp.Tests/Processing/Binarization/DitherTests.cs
+++ b/tests/ImageSharp.Tests/Processing/Binarization/DitherTests.cs
@@ -2,7 +2,6 @@
// Licensed under the Apache License, Version 2.0.
using SixLabors.ImageSharp.Dithering;
-using SixLabors.ImageSharp.Dithering.Ordered;
using SixLabors.ImageSharp.PixelFormats;
using SixLabors.ImageSharp.Processing.Processors;
using Moq;
diff --git a/tests/ImageSharp.Tests/Processing/Processors/Binarization/DitherTests.cs b/tests/ImageSharp.Tests/Processing/Processors/Binarization/DitherTests.cs
index e1749e6c16..9a6d24226b 100644
--- a/tests/ImageSharp.Tests/Processing/Processors/Binarization/DitherTests.cs
+++ b/tests/ImageSharp.Tests/Processing/Processors/Binarization/DitherTests.cs
@@ -1,8 +1,7 @@
// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
-using SixLabors.ImageSharp.Dithering;
-using SixLabors.ImageSharp.Dithering.Ordered;
+using SixLabors.ImageSharp.Dithering;
using SixLabors.ImageSharp.PixelFormats;
using SixLabors.ImageSharp.Tests.TestUtilities.ImageComparison;