diff --git a/packages.xml b/packages.xml
new file mode 100644
index 0000000000..c7ff4de4cd
--- /dev/null
+++ b/packages.xml
@@ -0,0 +1,153 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/samples/ChangeDefaultEncoderOptions/Program.cs b/samples/ChangeDefaultEncoderOptions/Program.cs
index d4541043f9..a8fbd75993 100644
--- a/samples/ChangeDefaultEncoderOptions/Program.cs
+++ b/samples/ChangeDefaultEncoderOptions/Program.cs
@@ -3,7 +3,7 @@
using System;
using SixLabors.ImageSharp;
-using SixLabors.ImageSharp.Formats;
+using SixLabors.ImageSharp.Formats.Jpeg;
namespace ChangeDefaultEncoderOptions
{
diff --git a/src/ImageSharp.Drawing/Brushes/IBrush.cs b/src/ImageSharp.Drawing/Brushes/IBrush.cs
index 80393a08c1..8b163d7f67 100644
--- a/src/ImageSharp.Drawing/Brushes/IBrush.cs
+++ b/src/ImageSharp.Drawing/Brushes/IBrush.cs
@@ -1,11 +1,12 @@
// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
+using SixLabors.ImageSharp.Drawing.Brushes.Processors;
using SixLabors.ImageSharp.Drawing.Processors;
using SixLabors.ImageSharp.PixelFormats;
using SixLabors.Primitives;
-namespace SixLabors.ImageSharp.Drawing
+namespace SixLabors.ImageSharp.Drawing.Brushes
{
///
/// Brush represents a logical configuration of a brush which can be used to source pixel colors
diff --git a/src/ImageSharp.Drawing/Brushes/ImageBrush{TPixel}.cs b/src/ImageSharp.Drawing/Brushes/ImageBrush{TPixel}.cs
index f04f16536d..593401777a 100644
--- a/src/ImageSharp.Drawing/Brushes/ImageBrush{TPixel}.cs
+++ b/src/ImageSharp.Drawing/Brushes/ImageBrush{TPixel}.cs
@@ -2,6 +2,7 @@
// Licensed under the Apache License, Version 2.0.
using System;
+using SixLabors.ImageSharp.Drawing.Brushes.Processors;
using SixLabors.ImageSharp.Drawing.Processors;
using SixLabors.ImageSharp.Memory;
using SixLabors.ImageSharp.PixelFormats;
diff --git a/src/ImageSharp.Drawing/Brushes/PatternBrush{TPixel}.cs b/src/ImageSharp.Drawing/Brushes/PatternBrush{TPixel}.cs
index 8d3f74d6c6..d02baae841 100644
--- a/src/ImageSharp.Drawing/Brushes/PatternBrush{TPixel}.cs
+++ b/src/ImageSharp.Drawing/Brushes/PatternBrush{TPixel}.cs
@@ -3,6 +3,7 @@
using System;
using System.Numerics;
+using SixLabors.ImageSharp.Drawing.Brushes.Processors;
using SixLabors.ImageSharp.Drawing.Processors;
using SixLabors.ImageSharp.Memory;
using SixLabors.ImageSharp.PixelFormats;
diff --git a/src/ImageSharp.Drawing/Brushes/Processors/BrushApplicator.cs b/src/ImageSharp.Drawing/Brushes/Processors/BrushApplicator.cs
index 34f4201457..888c7acb09 100644
--- a/src/ImageSharp.Drawing/Brushes/Processors/BrushApplicator.cs
+++ b/src/ImageSharp.Drawing/Brushes/Processors/BrushApplicator.cs
@@ -5,7 +5,7 @@ using System;
using SixLabors.ImageSharp.Memory;
using SixLabors.ImageSharp.PixelFormats;
-namespace SixLabors.ImageSharp.Drawing.Processors
+namespace SixLabors.ImageSharp.Drawing.Brushes.Processors
{
///
/// primitive that converts a point in to a color for discovering the fill color based on an implementation
diff --git a/src/ImageSharp.Drawing/Brushes/RecolorBrush{TPixel}.cs b/src/ImageSharp.Drawing/Brushes/RecolorBrush{TPixel}.cs
index d0fa81db38..97eb56d30d 100644
--- a/src/ImageSharp.Drawing/Brushes/RecolorBrush{TPixel}.cs
+++ b/src/ImageSharp.Drawing/Brushes/RecolorBrush{TPixel}.cs
@@ -3,6 +3,7 @@
using System;
using System.Numerics;
+using SixLabors.ImageSharp.Drawing.Brushes.Processors;
using SixLabors.ImageSharp.Drawing.Processors;
using SixLabors.ImageSharp.Memory;
using SixLabors.ImageSharp.PixelFormats;
diff --git a/src/ImageSharp.Drawing/Brushes/SolidBrush{TPixel}.cs b/src/ImageSharp.Drawing/Brushes/SolidBrush{TPixel}.cs
index 22d8d805f5..cd8456a478 100644
--- a/src/ImageSharp.Drawing/Brushes/SolidBrush{TPixel}.cs
+++ b/src/ImageSharp.Drawing/Brushes/SolidBrush{TPixel}.cs
@@ -3,6 +3,7 @@
using System;
using System.Numerics;
+using SixLabors.ImageSharp.Drawing.Brushes.Processors;
using SixLabors.ImageSharp.Drawing.Processors;
using SixLabors.ImageSharp.Memory;
using SixLabors.ImageSharp.PixelFormats;
diff --git a/src/ImageSharp.Drawing/Pens/IPen.cs b/src/ImageSharp.Drawing/Pens/IPen.cs
index 3a87bbeb47..0680ec2f56 100644
--- a/src/ImageSharp.Drawing/Pens/IPen.cs
+++ b/src/ImageSharp.Drawing/Pens/IPen.cs
@@ -1,6 +1,7 @@
// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
+using SixLabors.ImageSharp.Drawing.Brushes;
using SixLabors.ImageSharp.Drawing.Processors;
using SixLabors.ImageSharp.PixelFormats;
diff --git a/src/ImageSharp.Drawing/Pens/Pens.cs b/src/ImageSharp.Drawing/Pens/Pens.cs
index c90e1b8329..6478b1b813 100644
--- a/src/ImageSharp.Drawing/Pens/Pens.cs
+++ b/src/ImageSharp.Drawing/Pens/Pens.cs
@@ -1,6 +1,7 @@
// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
+using SixLabors.ImageSharp.Drawing.Brushes;
using SixLabors.ImageSharp.PixelFormats;
namespace SixLabors.ImageSharp.Drawing.Pens
diff --git a/src/ImageSharp.Drawing/PointInfo.cs b/src/ImageSharp.Drawing/PointInfo.cs
deleted file mode 100644
index bdc1917a7b..0000000000
--- a/src/ImageSharp.Drawing/PointInfo.cs
+++ /dev/null
@@ -1,21 +0,0 @@
-// Copyright (c) Six Labors and contributors.
-// Licensed under the Apache License, Version 2.0.
-
-namespace SixLabors.ImageSharp.Drawing
-{
- ///
- /// Returns details about how far away from the inside of a shape and the color the pixel could be.
- ///
- public struct PointInfo
- {
- ///
- /// The distance along path
- ///
- public float DistanceAlongPath;
-
- ///
- /// The distance from path
- ///
- public float DistanceFromPath;
- }
-}
diff --git a/src/ImageSharp.Drawing/Processors/DrawImageProcessor.cs b/src/ImageSharp.Drawing/Processors/DrawImageProcessor.cs
index 221cd9e39e..e1ce6b0133 100644
--- a/src/ImageSharp.Drawing/Processors/DrawImageProcessor.cs
+++ b/src/ImageSharp.Drawing/Processors/DrawImageProcessor.cs
@@ -94,7 +94,7 @@ namespace SixLabors.ImageSharp.Drawing.Processors
Parallel.For(
minY,
maxY,
- this.ParallelOptions,
+ source.Configuration.ParallelOptions,
y =>
{
Span background = sourcePixels.GetRowSpan(y).Slice(minX, width);
diff --git a/src/ImageSharp.Drawing/Processors/FillProcessor.cs b/src/ImageSharp.Drawing/Processors/FillProcessor.cs
index 66463b590d..fbd9654262 100644
--- a/src/ImageSharp.Drawing/Processors/FillProcessor.cs
+++ b/src/ImageSharp.Drawing/Processors/FillProcessor.cs
@@ -5,6 +5,8 @@ using System;
using System.Numerics;
using System.Threading.Tasks;
using SixLabors.ImageSharp.Drawing;
+using SixLabors.ImageSharp.Drawing.Brushes;
+using SixLabors.ImageSharp.Drawing.Brushes.Processors;
using SixLabors.ImageSharp.Memory;
using SixLabors.ImageSharp.PixelFormats;
using SixLabors.ImageSharp.Processing;
@@ -77,7 +79,7 @@ namespace SixLabors.ImageSharp.Drawing.Processors
Parallel.For(
minY,
maxY,
- this.ParallelOptions,
+ source.Configuration.ParallelOptions,
y =>
{
int offsetY = y - startY;
diff --git a/src/ImageSharp.Drawing/Processors/FillRegionProcessor.cs b/src/ImageSharp.Drawing/Processors/FillRegionProcessor.cs
index 7f7faa1111..3e0dedb3b0 100644
--- a/src/ImageSharp.Drawing/Processors/FillRegionProcessor.cs
+++ b/src/ImageSharp.Drawing/Processors/FillRegionProcessor.cs
@@ -5,6 +5,8 @@ using System;
using System.Buffers;
using System.Runtime.CompilerServices;
using SixLabors.ImageSharp.Drawing;
+using SixLabors.ImageSharp.Drawing.Brushes;
+using SixLabors.ImageSharp.Drawing.Brushes.Processors;
using SixLabors.ImageSharp.Memory;
using SixLabors.ImageSharp.PixelFormats;
using SixLabors.ImageSharp.Processing;
diff --git a/src/ImageSharp/ColorSpaces/IAlmostEquatable.cs b/src/ImageSharp/ColorSpaces/IAlmostEquatable.cs
index 3f62f75acb..08c2dafbc6 100644
--- a/src/ImageSharp/ColorSpaces/IAlmostEquatable.cs
+++ b/src/ImageSharp/ColorSpaces/IAlmostEquatable.cs
@@ -11,7 +11,7 @@ namespace SixLabors.ImageSharp.ColorSpaces
///
/// The type of objects to compare.
/// The object specifying the type to specify precision with.
- public interface IAlmostEquatable
+ internal interface IAlmostEquatable
where TPrecision : struct, IComparable
{
///
diff --git a/src/ImageSharp/ColorSpaces/IColorVector.cs b/src/ImageSharp/ColorSpaces/IColorVector.cs
index 3903e1c098..85c040b868 100644
--- a/src/ImageSharp/ColorSpaces/IColorVector.cs
+++ b/src/ImageSharp/ColorSpaces/IColorVector.cs
@@ -8,7 +8,7 @@ namespace SixLabors.ImageSharp.ColorSpaces
///
/// Color represented as a vector in its color space
///
- public interface IColorVector
+ internal interface IColorVector
{
///
/// Gets the vector representation of the color
diff --git a/src/ImageSharp/Common/Extensions/EnumerableExtensions.cs b/src/ImageSharp/Common/Extensions/EnumerableExtensions.cs
index f20f1a63e0..e97a2eaed0 100644
--- a/src/ImageSharp/Common/Extensions/EnumerableExtensions.cs
+++ b/src/ImageSharp/Common/Extensions/EnumerableExtensions.cs
@@ -4,12 +4,12 @@
using System;
using System.Collections.Generic;
-namespace SixLabors.ImageSharp
+namespace SixLabors.ImageSharp.Common
{
///
/// Encapsulates a series of time saving extension methods to the interface.
///
- public static class EnumerableExtensions
+ internal static class EnumerableExtensions
{
///
/// Generates a sequence of integral numbers within a specified range.
diff --git a/src/ImageSharp/Configuration.cs b/src/ImageSharp/Configuration.cs
index 8e70c77164..a25f2573d8 100644
--- a/src/ImageSharp/Configuration.cs
+++ b/src/ImageSharp/Configuration.cs
@@ -7,6 +7,10 @@ using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using SixLabors.ImageSharp.Formats;
+using SixLabors.ImageSharp.Formats.Bmp;
+using SixLabors.ImageSharp.Formats.Gif;
+using SixLabors.ImageSharp.Formats.Jpeg;
+using SixLabors.ImageSharp.Formats.Png;
using SixLabors.ImageSharp.IO;
namespace SixLabors.ImageSharp
diff --git a/src/ImageSharp/Dithering/ErrorDiffusion/Atkinson.cs b/src/ImageSharp/Dithering/ErrorDiffusion/AtkinsonDiffuser.cs
similarity index 84%
rename from src/ImageSharp/Dithering/ErrorDiffusion/Atkinson.cs
rename to src/ImageSharp/Dithering/ErrorDiffusion/AtkinsonDiffuser.cs
index dc15cdcd35..3899b14cc9 100644
--- a/src/ImageSharp/Dithering/ErrorDiffusion/Atkinson.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 Atkinson : ErrorDiffuser
+ public sealed class AtkinsonDiffuser : ErrorDiffuserBase
{
///
/// The diffusion matrix
@@ -23,9 +24,9 @@ namespace SixLabors.ImageSharp.Dithering
};
///
- /// Initializes a new instance of the class.
+ /// Initializes a new instance of the class.
///
- public Atkinson()
+ public AtkinsonDiffuser()
: base(AtkinsonMatrix, 8)
{
}
diff --git a/src/ImageSharp/Dithering/ErrorDiffusion/Burks.cs b/src/ImageSharp/Dithering/ErrorDiffusion/BurksDiffuser.cs
similarity index 78%
rename from src/ImageSharp/Dithering/ErrorDiffusion/Burks.cs
rename to src/ImageSharp/Dithering/ErrorDiffusion/BurksDiffuser.cs
index 66697aab76..4d9f4d3c4f 100644
--- a/src/ImageSharp/Dithering/ErrorDiffusion/Burks.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 Burks : ErrorDiffuser
+ public sealed class BurksDiffuser : ErrorDiffuserBase
{
///
/// The diffusion matrix
@@ -22,9 +23,9 @@ namespace SixLabors.ImageSharp.Dithering
};
///
- /// Initializes a new instance of the class.
+ /// Initializes a new instance of the class.
///
- public Burks()
+ public BurksDiffuser()
: base(BurksMatrix, 32)
{
}
diff --git a/src/ImageSharp/Dithering/ErrorDiffusion/ErrorDiffuser.cs b/src/ImageSharp/Dithering/ErrorDiffusion/ErrorDiffuserBase.cs
similarity index 87%
rename from src/ImageSharp/Dithering/ErrorDiffusion/ErrorDiffuser.cs
rename to src/ImageSharp/Dithering/ErrorDiffusion/ErrorDiffuserBase.cs
index 8d05bfcb64..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));
@@ -69,15 +69,15 @@ namespace SixLabors.ImageSharp.Dithering
///
[MethodImpl(MethodImplOptions.AggressiveInlining)]
- public void Dither(ImageBase pixels, TPixel source, TPixel transformed, int x, int y, int width, int height)
+ public void Dither(ImageBase pixels, TPixel source, TPixel transformed, int x, int y, int minX, int minY, int maxX, int maxY)
where TPixel : struct, IPixel
{
- this.Dither(pixels, source, transformed, x, y, width, height, true);
+ this.Dither(pixels, source, transformed, x, y, minX, minY, maxX, maxY, true);
}
///
[MethodImpl(MethodImplOptions.AggressiveInlining)]
- public void Dither(ImageBase image, TPixel source, TPixel transformed, int x, int y, int width, int height, bool replacePixel)
+ public void Dither(ImageBase image, TPixel source, TPixel transformed, int x, int y, int minX, int minY, int maxX, int maxY, bool replacePixel)
where TPixel : struct, IPixel
{
if (replacePixel)
@@ -93,7 +93,7 @@ namespace SixLabors.ImageSharp.Dithering
for (int row = 0; row < this.matrixHeight; row++)
{
int matrixY = y + row;
- if (matrixY > 0 && matrixY < height)
+ if (matrixY > minY && matrixY < maxY)
{
Span rowSpan = image.GetRowSpan(matrixY);
@@ -101,7 +101,7 @@ namespace SixLabors.ImageSharp.Dithering
{
int matrixX = x + (col - this.startingOffset);
- if (matrixX > 0 && matrixX < width)
+ if (matrixX > minX && matrixX < maxX)
{
float coefficient = this.matrix[row, col];
diff --git a/src/ImageSharp/Dithering/ErrorDiffusion/FloydSteinberg.cs b/src/ImageSharp/Dithering/ErrorDiffusion/FloydSteinbergDiffuser.cs
similarity index 82%
rename from src/ImageSharp/Dithering/ErrorDiffusion/FloydSteinberg.cs
rename to src/ImageSharp/Dithering/ErrorDiffusion/FloydSteinbergDiffuser.cs
index 5422d83bb8..6457fbe01e 100644
--- a/src/ImageSharp/Dithering/ErrorDiffusion/FloydSteinberg.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 FloydSteinberg : ErrorDiffuser
+ public sealed class FloydSteinbergDiffuser : ErrorDiffuserBase
{
///
/// The diffusion matrix
@@ -22,9 +23,9 @@ namespace SixLabors.ImageSharp.Dithering
};
///
- /// Initializes a new instance of the class.
+ /// Initializes a new instance of the class.
///
- public FloydSteinberg()
+ public FloydSteinbergDiffuser()
: base(FloydSteinbergMatrix, 16)
{
}
diff --git a/src/ImageSharp/Dithering/ErrorDiffusion/IErrorDiffuser.cs b/src/ImageSharp/Dithering/ErrorDiffusion/IErrorDiffuser.cs
index 57eea6b921..850c978fef 100644
--- a/src/ImageSharp/Dithering/ErrorDiffusion/IErrorDiffuser.cs
+++ b/src/ImageSharp/Dithering/ErrorDiffusion/IErrorDiffuser.cs
@@ -18,10 +18,12 @@ namespace SixLabors.ImageSharp.Dithering
/// The transformed pixel
/// The column index.
/// The row index.
- /// The image width.
- /// The image height.
+ /// The minimum column value.
+ /// The minimum row value.
+ /// The maximum column value.
+ /// The maximum row value.
/// The pixel format.
- void Dither(ImageBase image, TPixel source, TPixel transformed, int x, int y, int width, int height)
+ void Dither(ImageBase image, TPixel source, TPixel transformed, int x, int y, int minX, int minY, int maxX, int maxY)
where TPixel : struct, IPixel;
///
@@ -32,14 +34,16 @@ namespace SixLabors.ImageSharp.Dithering
/// The transformed pixel
/// The column index.
/// The row index.
- /// The image width.
- /// The image height.
+ /// The minimum column value.
+ /// The minimum row value.
+ /// The maximum column value.
+ /// The maximum row value.
///
/// Whether to replace the pixel at the given coordinates with the transformed value.
/// Generally this would be true for standard two-color dithering but when used in conjunction with color quantization this should be false.
///
/// The pixel format.
- void Dither(ImageBase image, TPixel source, TPixel transformed, int x, int y, int width, int height, bool replacePixel)
+ void Dither(ImageBase image, TPixel source, TPixel transformed, int x, int y, int minX, int minY, int maxX, int maxY, bool replacePixel)
where TPixel : struct, IPixel;
}
}
diff --git a/src/ImageSharp/Dithering/ErrorDiffusion/JarvisJudiceNinke.cs b/src/ImageSharp/Dithering/ErrorDiffusion/JarvisJudiceNinkeDiffuser.cs
similarity index 82%
rename from src/ImageSharp/Dithering/ErrorDiffusion/JarvisJudiceNinke.cs
rename to src/ImageSharp/Dithering/ErrorDiffusion/JarvisJudiceNinkeDiffuser.cs
index 637240a124..30e09b47a9 100644
--- a/src/ImageSharp/Dithering/ErrorDiffusion/JarvisJudiceNinke.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 JarvisJudiceNinke : ErrorDiffuser
+ public sealed class JarvisJudiceNinkeDiffuser : ErrorDiffuserBase
{
///
/// The diffusion matrix
@@ -23,9 +24,9 @@ namespace SixLabors.ImageSharp.Dithering
};
///
- /// Initializes a new instance of the class.
+ /// Initializes a new instance of the class.
///
- public JarvisJudiceNinke()
+ public JarvisJudiceNinkeDiffuser()
: base(JarvisJudiceNinkeMatrix, 48)
{
}
diff --git a/src/ImageSharp/Dithering/ErrorDiffusion/Sierra2.cs b/src/ImageSharp/Dithering/ErrorDiffusion/Sierra2Diffuser.cs
similarity index 84%
rename from src/ImageSharp/Dithering/ErrorDiffusion/Sierra2.cs
rename to src/ImageSharp/Dithering/ErrorDiffusion/Sierra2Diffuser.cs
index db37b45afc..c472d25b0d 100644
--- a/src/ImageSharp/Dithering/ErrorDiffusion/Sierra2.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 Sierra2 : ErrorDiffuser
+ public sealed class Sierra2Diffuser : ErrorDiffuserBase
{
///
/// The diffusion matrix
@@ -22,9 +23,9 @@ namespace SixLabors.ImageSharp.Dithering
};
///
- /// Initializes a new instance of the class.
+ /// Initializes a new instance of the class.
///
- public Sierra2()
+ public Sierra2Diffuser()
: base(Sierra2Matrix, 16)
{
}
diff --git a/src/ImageSharp/Dithering/ErrorDiffusion/Sierra3.cs b/src/ImageSharp/Dithering/ErrorDiffusion/Sierra3Diffuser.cs
similarity index 84%
rename from src/ImageSharp/Dithering/ErrorDiffusion/Sierra3.cs
rename to src/ImageSharp/Dithering/ErrorDiffusion/Sierra3Diffuser.cs
index f812fcdc30..c19ab2aaac 100644
--- a/src/ImageSharp/Dithering/ErrorDiffusion/Sierra3.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 Sierra3 : ErrorDiffuser
+ public sealed class Sierra3Diffuser : ErrorDiffuserBase
{
///
/// The diffusion matrix
@@ -23,9 +24,9 @@ namespace SixLabors.ImageSharp.Dithering
};
///
- /// Initializes a new instance of the class.
+ /// Initializes a new instance of the class.
///
- public Sierra3()
+ public Sierra3Diffuser()
: base(Sierra3Matrix, 32)
{
}
diff --git a/src/ImageSharp/Dithering/ErrorDiffusion/SierraLite.cs b/src/ImageSharp/Dithering/ErrorDiffusion/SierraLiteDiffuser.cs
similarity index 83%
rename from src/ImageSharp/Dithering/ErrorDiffusion/SierraLite.cs
rename to src/ImageSharp/Dithering/ErrorDiffusion/SierraLiteDiffuser.cs
index 98af7b432b..263bae568a 100644
--- a/src/ImageSharp/Dithering/ErrorDiffusion/SierraLite.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 SierraLite : ErrorDiffuser
+ public sealed class SierraLiteDiffuser : ErrorDiffuserBase
{
///
/// The diffusion matrix
@@ -22,9 +23,9 @@ namespace SixLabors.ImageSharp.Dithering
};
///
- /// Initializes a new instance of the class.
+ /// Initializes a new instance of the class.
///
- public SierraLite()
+ public SierraLiteDiffuser()
: base(SierraLiteMatrix, 4)
{
}
diff --git a/src/ImageSharp/Dithering/ErrorDiffusion/Stucki.cs b/src/ImageSharp/Dithering/ErrorDiffusion/StuckiDiffuser.cs
similarity index 78%
rename from src/ImageSharp/Dithering/ErrorDiffusion/Stucki.cs
rename to src/ImageSharp/Dithering/ErrorDiffusion/StuckiDiffuser.cs
index 2f94639be8..0717695065 100644
--- a/src/ImageSharp/Dithering/ErrorDiffusion/Stucki.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 Stucki : ErrorDiffuser
+ public sealed class StuckiDiffuser : ErrorDiffuserBase
{
///
/// The diffusion matrix
@@ -23,9 +24,9 @@ namespace SixLabors.ImageSharp.Dithering
};
///
- /// Initializes a new instance of the class.
+ /// Initializes a new instance of the class.
///
- public Stucki()
+ public StuckiDiffuser()
: base(StuckiMatrix, 42)
{
}
diff --git a/src/ImageSharp/Dithering/Ordered/Bayer.cs b/src/ImageSharp/Dithering/Ordered/BayerDither.cs
similarity index 78%
rename from src/ImageSharp/Dithering/Ordered/Bayer.cs
rename to src/ImageSharp/Dithering/Ordered/BayerDither.cs
index cfbdb0888a..685dca5fe8 100644
--- a/src/ImageSharp/Dithering/Ordered/Bayer.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 Bayer : OrderedDither4x4
+ public sealed class BayerDither : OrderedDitherBase
{
///
/// The threshold matrix.
@@ -25,9 +26,9 @@ namespace SixLabors.ImageSharp.Dithering.Ordered
};
///
- /// Initializes a new instance of the class.
+ /// Initializes a new instance of the class.
///
- public Bayer()
+ public BayerDither()
: base(ThresholdMatrix)
{
}
diff --git a/src/ImageSharp/Dithering/Ordered/IOrderedDither.cs b/src/ImageSharp/Dithering/Ordered/IOrderedDither.cs
index fbd51a2539..e3c7c5cbaf 100644
--- a/src/ImageSharp/Dithering/Ordered/IOrderedDither.cs
+++ b/src/ImageSharp/Dithering/Ordered/IOrderedDither.cs
@@ -21,10 +21,8 @@ namespace SixLabors.ImageSharp.Dithering
/// The component index to test the threshold against. Must range from 0 to 3.
/// The column index.
/// The row index.
- /// The image width.
- /// The image height.
/// The pixel format.
- void Dither(ImageBase image, TPixel source, TPixel upper, TPixel lower, byte[] bytes, int index, int x, int y, int width, int height)
+ void Dither(ImageBase image, TPixel source, TPixel upper, TPixel lower, byte[] bytes, int index, int x, int y)
where TPixel : struct, IPixel;
}
}
\ No newline at end of file
diff --git a/src/ImageSharp/Dithering/Ordered/Ordered.cs b/src/ImageSharp/Dithering/Ordered/OrderedDither.cs
similarity index 83%
rename from src/ImageSharp/Dithering/Ordered/Ordered.cs
rename to src/ImageSharp/Dithering/Ordered/OrderedDither.cs
index 4b559c4e12..12968914d0 100644
--- a/src/ImageSharp/Dithering/Ordered/Ordered.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 Ordered : OrderedDither4x4
+ public sealed class OrderedDither : OrderedDitherBase
{
///
/// The threshold matrix.
@@ -25,9 +26,9 @@ namespace SixLabors.ImageSharp.Dithering.Ordered
};
///
- /// Initializes a new instance of the class.
+ /// Initializes a new instance of the class.
///
- public Ordered()
+ public OrderedDither()
: base(ThresholdMatrix)
{
}
diff --git a/src/ImageSharp/Dithering/Ordered/OrderedDither4x4.cs b/src/ImageSharp/Dithering/Ordered/OrderedDitherBase.cs
similarity index 84%
rename from src/ImageSharp/Dithering/Ordered/OrderedDither4x4.cs
rename to src/ImageSharp/Dithering/Ordered/OrderedDitherBase.cs
index 94292b7b51..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,16 +17,16 @@ 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;
}
///
- public void Dither(ImageBase image, TPixel source, TPixel upper, TPixel lower, byte[] bytes, int index, int x, int y, int width, int height)
+ public void Dither(ImageBase image, TPixel source, TPixel upper, TPixel lower, byte[] bytes, int index, int x, int y)
where TPixel : struct, IPixel
{
// TODO: This doesn't really cut it for me.
diff --git a/src/ImageSharp/Formats/Bmp/BmpBitsPerPixel.cs b/src/ImageSharp/Formats/Bmp/BmpBitsPerPixel.cs
index 5ea9baa164..d08487cf27 100644
--- a/src/ImageSharp/Formats/Bmp/BmpBitsPerPixel.cs
+++ b/src/ImageSharp/Formats/Bmp/BmpBitsPerPixel.cs
@@ -1,7 +1,7 @@
// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
-namespace SixLabors.ImageSharp.Formats
+namespace SixLabors.ImageSharp.Formats.Bmp
{
///
/// Enumerates the available bits per pixel for bitmap.
diff --git a/src/ImageSharp/Formats/Bmp/BmpCompression.cs b/src/ImageSharp/Formats/Bmp/BmpCompression.cs
index e2a73639d1..1280498acb 100644
--- a/src/ImageSharp/Formats/Bmp/BmpCompression.cs
+++ b/src/ImageSharp/Formats/Bmp/BmpCompression.cs
@@ -1,7 +1,7 @@
// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
-namespace SixLabors.ImageSharp.Formats
+namespace SixLabors.ImageSharp.Formats.Bmp
{
///
/// Defines how the compression type of the image data
diff --git a/src/ImageSharp/Formats/Bmp/BmpConfigurationModule.cs b/src/ImageSharp/Formats/Bmp/BmpConfigurationModule.cs
index 46340fa85f..7477cfdb8b 100644
--- a/src/ImageSharp/Formats/Bmp/BmpConfigurationModule.cs
+++ b/src/ImageSharp/Formats/Bmp/BmpConfigurationModule.cs
@@ -1,7 +1,7 @@
// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
-namespace SixLabors.ImageSharp.Formats
+namespace SixLabors.ImageSharp.Formats.Bmp
{
///
/// Registers the image encoders, decoders and mime type detectors for the bmp format.
diff --git a/src/ImageSharp/Formats/Bmp/BmpConstants.cs b/src/ImageSharp/Formats/Bmp/BmpConstants.cs
index 15187e9691..b7291bb99e 100644
--- a/src/ImageSharp/Formats/Bmp/BmpConstants.cs
+++ b/src/ImageSharp/Formats/Bmp/BmpConstants.cs
@@ -3,7 +3,7 @@
using System.Collections.Generic;
-namespace SixLabors.ImageSharp.Formats
+namespace SixLabors.ImageSharp.Formats.Bmp
{
///
/// Defines constants relating to BMPs
diff --git a/src/ImageSharp/Formats/Bmp/BmpDecoder.cs b/src/ImageSharp/Formats/Bmp/BmpDecoder.cs
index 1b015f8e64..8b53194fdc 100644
--- a/src/ImageSharp/Formats/Bmp/BmpDecoder.cs
+++ b/src/ImageSharp/Formats/Bmp/BmpDecoder.cs
@@ -6,7 +6,7 @@ using System.Collections.Generic;
using System.IO;
using SixLabors.ImageSharp.PixelFormats;
-namespace SixLabors.ImageSharp.Formats
+namespace SixLabors.ImageSharp.Formats.Bmp
{
///
/// Image decoder for generating an image out of a Windows bitmap stream.
diff --git a/src/ImageSharp/Formats/Bmp/BmpDecoderCore.cs b/src/ImageSharp/Formats/Bmp/BmpDecoderCore.cs
index f26476222f..c464cae0e7 100644
--- a/src/ImageSharp/Formats/Bmp/BmpDecoderCore.cs
+++ b/src/ImageSharp/Formats/Bmp/BmpDecoderCore.cs
@@ -6,7 +6,7 @@ using System.Runtime.CompilerServices;
using SixLabors.ImageSharp.Memory;
using SixLabors.ImageSharp.PixelFormats;
-namespace SixLabors.ImageSharp.Formats
+namespace SixLabors.ImageSharp.Formats.Bmp
{
///
/// Performs the bmp decoding operation.
@@ -120,11 +120,11 @@ namespace SixLabors.ImageSharp.Formats
this.currentStream.Read(palette, 0, colorMapSize);
}
- if (this.infoHeader.Width > Image.MaxWidth || this.infoHeader.Height > Image.MaxHeight)
+ if (this.infoHeader.Width > int.MaxValue || this.infoHeader.Height > int.MaxValue)
{
throw new ArgumentOutOfRangeException(
$"The input bitmap '{this.infoHeader.Width}x{this.infoHeader.Height}' is "
- + $"bigger then the max allowed size '{Image.MaxWidth}x{Image.MaxHeight}'");
+ + $"bigger then the max allowed size '{int.MaxValue}x{int.MaxValue}'");
}
Image image = new Image(this.configuration, this.infoHeader.Width, this.infoHeader.Height);
diff --git a/src/ImageSharp/Formats/Bmp/BmpEncoder.cs b/src/ImageSharp/Formats/Bmp/BmpEncoder.cs
index a0db29d7a0..366afceb5f 100644
--- a/src/ImageSharp/Formats/Bmp/BmpEncoder.cs
+++ b/src/ImageSharp/Formats/Bmp/BmpEncoder.cs
@@ -6,7 +6,7 @@ using System.Collections.Generic;
using System.IO;
using SixLabors.ImageSharp.PixelFormats;
-namespace SixLabors.ImageSharp.Formats
+namespace SixLabors.ImageSharp.Formats.Bmp
{
///
/// Image encoder for writing an image to a stream as a Windows bitmap.
diff --git a/src/ImageSharp/Formats/Bmp/BmpEncoderCore.cs b/src/ImageSharp/Formats/Bmp/BmpEncoderCore.cs
index 67754a175a..7f49be12a0 100644
--- a/src/ImageSharp/Formats/Bmp/BmpEncoderCore.cs
+++ b/src/ImageSharp/Formats/Bmp/BmpEncoderCore.cs
@@ -6,7 +6,7 @@ using System.IO;
using SixLabors.ImageSharp.IO;
using SixLabors.ImageSharp.PixelFormats;
-namespace SixLabors.ImageSharp.Formats
+namespace SixLabors.ImageSharp.Formats.Bmp
{
///
/// Image encoder for writing an image to a stream as a Windows bitmap.
diff --git a/src/ImageSharp/Formats/Bmp/BmpFileHeader.cs b/src/ImageSharp/Formats/Bmp/BmpFileHeader.cs
index 7fe8cd458b..4255ecae49 100644
--- a/src/ImageSharp/Formats/Bmp/BmpFileHeader.cs
+++ b/src/ImageSharp/Formats/Bmp/BmpFileHeader.cs
@@ -1,7 +1,7 @@
// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
-namespace SixLabors.ImageSharp.Formats
+namespace SixLabors.ImageSharp.Formats.Bmp
{
///
/// Stores general information about the Bitmap file.
diff --git a/src/ImageSharp/Formats/Bmp/BmpFormat.cs b/src/ImageSharp/Formats/Bmp/BmpFormat.cs
index 447bf6cb0b..64c6574c1e 100644
--- a/src/ImageSharp/Formats/Bmp/BmpFormat.cs
+++ b/src/ImageSharp/Formats/Bmp/BmpFormat.cs
@@ -3,7 +3,7 @@
using System.Collections.Generic;
-namespace SixLabors.ImageSharp.Formats
+namespace SixLabors.ImageSharp.Formats.Bmp
{
///
/// Registers the image encoders, decoders and mime type detectors for the bmp format.
diff --git a/src/ImageSharp/Formats/Bmp/BmpImageFormatDetector.cs b/src/ImageSharp/Formats/Bmp/BmpImageFormatDetector.cs
index 6bd1f9d289..39bbc4d67b 100644
--- a/src/ImageSharp/Formats/Bmp/BmpImageFormatDetector.cs
+++ b/src/ImageSharp/Formats/Bmp/BmpImageFormatDetector.cs
@@ -3,7 +3,7 @@
using System;
-namespace SixLabors.ImageSharp.Formats
+namespace SixLabors.ImageSharp.Formats.Bmp
{
///
/// Detects bmp file headers
diff --git a/src/ImageSharp/Formats/Bmp/BmpInfoHeader.cs b/src/ImageSharp/Formats/Bmp/BmpInfoHeader.cs
index d5c9213131..1037a97f93 100644
--- a/src/ImageSharp/Formats/Bmp/BmpInfoHeader.cs
+++ b/src/ImageSharp/Formats/Bmp/BmpInfoHeader.cs
@@ -1,6 +1,6 @@
// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
-namespace SixLabors.ImageSharp.Formats
+namespace SixLabors.ImageSharp.Formats.Bmp
{
///
/// This block of bytes tells the application detailed information
diff --git a/src/ImageSharp/Formats/Bmp/IBmpDecoderOptions.cs b/src/ImageSharp/Formats/Bmp/IBmpDecoderOptions.cs
index 08b47c0e1c..920c9ce028 100644
--- a/src/ImageSharp/Formats/Bmp/IBmpDecoderOptions.cs
+++ b/src/ImageSharp/Formats/Bmp/IBmpDecoderOptions.cs
@@ -6,7 +6,7 @@ using System.Collections.Generic;
using System.IO;
using SixLabors.ImageSharp.PixelFormats;
-namespace SixLabors.ImageSharp.Formats
+namespace SixLabors.ImageSharp.Formats.Bmp
{
///
/// Image decoder options for decoding Windows bitmap streams.
diff --git a/src/ImageSharp/Formats/Bmp/IBmpEncoderOptions.cs b/src/ImageSharp/Formats/Bmp/IBmpEncoderOptions.cs
index c89b2b25c0..c4e219889d 100644
--- a/src/ImageSharp/Formats/Bmp/IBmpEncoderOptions.cs
+++ b/src/ImageSharp/Formats/Bmp/IBmpEncoderOptions.cs
@@ -6,7 +6,7 @@ using System.Collections.Generic;
using System.IO;
using SixLabors.ImageSharp.PixelFormats;
-namespace SixLabors.ImageSharp.Formats
+namespace SixLabors.ImageSharp.Formats.Bmp
{
///
/// Configuration options for use during bmp encoding
diff --git a/src/ImageSharp/Formats/Bmp/ImageExtensions.cs b/src/ImageSharp/Formats/Bmp/ImageExtensions.cs
index d80abb51e3..43cb94c3f4 100644
--- a/src/ImageSharp/Formats/Bmp/ImageExtensions.cs
+++ b/src/ImageSharp/Formats/Bmp/ImageExtensions.cs
@@ -4,6 +4,7 @@
using System;
using System.IO;
using SixLabors.ImageSharp.Formats;
+using SixLabors.ImageSharp.Formats.Bmp;
using SixLabors.ImageSharp.PixelFormats;
namespace SixLabors.ImageSharp
diff --git a/src/ImageSharp/Formats/Gif/DisposalMethod.cs b/src/ImageSharp/Formats/Gif/DisposalMethod.cs
index 94cf820882..f553c204b7 100644
--- a/src/ImageSharp/Formats/Gif/DisposalMethod.cs
+++ b/src/ImageSharp/Formats/Gif/DisposalMethod.cs
@@ -1,7 +1,7 @@
// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
-namespace SixLabors.ImageSharp.Formats
+namespace SixLabors.ImageSharp.Formats.Gif
{
///
/// Provides enumeration for instructing the decoder what to do with the last image
diff --git a/src/ImageSharp/Formats/Gif/GifConfigurationModule.cs b/src/ImageSharp/Formats/Gif/GifConfigurationModule.cs
index 676363bbeb..4c42a833c0 100644
--- a/src/ImageSharp/Formats/Gif/GifConfigurationModule.cs
+++ b/src/ImageSharp/Formats/Gif/GifConfigurationModule.cs
@@ -1,7 +1,7 @@
// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
-namespace SixLabors.ImageSharp.Formats
+namespace SixLabors.ImageSharp.Formats.Gif
{
///
/// Registers the image encoders, decoders and mime type detectors for the gif format.
diff --git a/src/ImageSharp/Formats/Gif/GifConstants.cs b/src/ImageSharp/Formats/Gif/GifConstants.cs
index e65d33c72c..d448cf7838 100644
--- a/src/ImageSharp/Formats/Gif/GifConstants.cs
+++ b/src/ImageSharp/Formats/Gif/GifConstants.cs
@@ -4,7 +4,7 @@
using System.Collections.Generic;
using System.Text;
-namespace SixLabors.ImageSharp.Formats
+namespace SixLabors.ImageSharp.Formats.Gif
{
///
/// Constants that define specific points within a gif.
diff --git a/src/ImageSharp/Formats/Gif/GifDecoder.cs b/src/ImageSharp/Formats/Gif/GifDecoder.cs
index 9322cec8d0..5ded251e2d 100644
--- a/src/ImageSharp/Formats/Gif/GifDecoder.cs
+++ b/src/ImageSharp/Formats/Gif/GifDecoder.cs
@@ -7,7 +7,7 @@ using System.IO;
using System.Text;
using SixLabors.ImageSharp.PixelFormats;
-namespace SixLabors.ImageSharp.Formats
+namespace SixLabors.ImageSharp.Formats.Gif
{
///
/// Decoder for generating an image out of a gif encoded stream.
diff --git a/src/ImageSharp/Formats/Gif/GifDecoderCore.cs b/src/ImageSharp/Formats/Gif/GifDecoderCore.cs
index 1547046582..f94cf0e731 100644
--- a/src/ImageSharp/Formats/Gif/GifDecoderCore.cs
+++ b/src/ImageSharp/Formats/Gif/GifDecoderCore.cs
@@ -6,10 +6,11 @@ using System.Buffers;
using System.IO;
using System.Runtime.CompilerServices;
using System.Text;
+using SixLabors.ImageSharp.MetaData;
using SixLabors.ImageSharp.PixelFormats;
using SixLabors.Primitives;
-namespace SixLabors.ImageSharp.Formats
+namespace SixLabors.ImageSharp.Formats.Gif
{
///
/// Performs the gif decoding operation.
@@ -520,7 +521,7 @@ namespace SixLabors.ImageSharp.Formats
///
/// The meta data.
[MethodImpl(MethodImplOptions.AggressiveInlining)]
- private void SetFrameMetaData(IMetaData metaData)
+ private void SetFrameMetaData(IFrameMetaData metaData)
{
if (this.graphicsControlExtension != null)
{
diff --git a/src/ImageSharp/Formats/Gif/GifEncoder.cs b/src/ImageSharp/Formats/Gif/GifEncoder.cs
index 2dde83d9fe..2c3bb29299 100644
--- a/src/ImageSharp/Formats/Gif/GifEncoder.cs
+++ b/src/ImageSharp/Formats/Gif/GifEncoder.cs
@@ -8,7 +8,7 @@ using System.Text;
using SixLabors.ImageSharp.PixelFormats;
using SixLabors.ImageSharp.Quantizers;
-namespace SixLabors.ImageSharp.Formats
+namespace SixLabors.ImageSharp.Formats.Gif
{
///
/// Image encoder for writing image data to a stream in gif format.
diff --git a/src/ImageSharp/Formats/Gif/GifEncoderCore.cs b/src/ImageSharp/Formats/Gif/GifEncoderCore.cs
index 8105c695db..5022678384 100644
--- a/src/ImageSharp/Formats/Gif/GifEncoderCore.cs
+++ b/src/ImageSharp/Formats/Gif/GifEncoderCore.cs
@@ -7,10 +7,11 @@ using System.IO;
using System.Linq;
using System.Text;
using SixLabors.ImageSharp.IO;
+using SixLabors.ImageSharp.MetaData;
using SixLabors.ImageSharp.PixelFormats;
using SixLabors.ImageSharp.Quantizers;
-namespace SixLabors.ImageSharp.Formats
+namespace SixLabors.ImageSharp.Formats.Gif
{
///
/// Performs the gif encoding operation.
@@ -287,7 +288,7 @@ namespace SixLabors.ImageSharp.Formats
/// The metadata of the image or frame.
/// The stream to write to.
/// The index of the color in the color palette to make transparent.
- private void WriteGraphicalControlExtension(IMetaData metaData, EndianBinaryWriter writer, int transparencyIndex)
+ private void WriteGraphicalControlExtension(IFrameMetaData metaData, EndianBinaryWriter writer, int transparencyIndex)
{
var extension = new GifGraphicsControlExtension
{
diff --git a/src/ImageSharp/Formats/Gif/GifFormat.cs b/src/ImageSharp/Formats/Gif/GifFormat.cs
index 887081fc7a..6353690f47 100644
--- a/src/ImageSharp/Formats/Gif/GifFormat.cs
+++ b/src/ImageSharp/Formats/Gif/GifFormat.cs
@@ -3,7 +3,7 @@
using System.Collections.Generic;
-namespace SixLabors.ImageSharp.Formats
+namespace SixLabors.ImageSharp.Formats.Gif
{
///
/// Registers the image encoders, decoders and mime type detectors for the gif format.
diff --git a/src/ImageSharp/Formats/Gif/GifImageFormatDetector.cs b/src/ImageSharp/Formats/Gif/GifImageFormatDetector.cs
index 7f908ad983..36346f6062 100644
--- a/src/ImageSharp/Formats/Gif/GifImageFormatDetector.cs
+++ b/src/ImageSharp/Formats/Gif/GifImageFormatDetector.cs
@@ -3,7 +3,7 @@
using System;
-namespace SixLabors.ImageSharp.Formats
+namespace SixLabors.ImageSharp.Formats.Gif
{
///
/// Detects gif file headers
diff --git a/src/ImageSharp/Formats/Gif/IGifDecoderOptions.cs b/src/ImageSharp/Formats/Gif/IGifDecoderOptions.cs
index c5ba972de6..60c39f9362 100644
--- a/src/ImageSharp/Formats/Gif/IGifDecoderOptions.cs
+++ b/src/ImageSharp/Formats/Gif/IGifDecoderOptions.cs
@@ -7,7 +7,7 @@ using System.IO;
using System.Text;
using SixLabors.ImageSharp.PixelFormats;
-namespace SixLabors.ImageSharp.Formats
+namespace SixLabors.ImageSharp.Formats.Gif
{
///
/// Decoder for generating an image out of a gif encoded stream.
diff --git a/src/ImageSharp/Formats/Gif/IGifEncoderOptions.cs b/src/ImageSharp/Formats/Gif/IGifEncoderOptions.cs
index 1b8cf166e8..374dea6595 100644
--- a/src/ImageSharp/Formats/Gif/IGifEncoderOptions.cs
+++ b/src/ImageSharp/Formats/Gif/IGifEncoderOptions.cs
@@ -8,7 +8,7 @@ using System.Text;
using SixLabors.ImageSharp.PixelFormats;
using SixLabors.ImageSharp.Quantizers;
-namespace SixLabors.ImageSharp.Formats
+namespace SixLabors.ImageSharp.Formats.Gif
{
///
/// The configuration options used for encoding gifs
diff --git a/src/ImageSharp/Formats/Gif/ImageExtensions.cs b/src/ImageSharp/Formats/Gif/ImageExtensions.cs
index cfdd544c71..b5f358f583 100644
--- a/src/ImageSharp/Formats/Gif/ImageExtensions.cs
+++ b/src/ImageSharp/Formats/Gif/ImageExtensions.cs
@@ -4,6 +4,7 @@
using System;
using System.IO;
using SixLabors.ImageSharp.Formats;
+using SixLabors.ImageSharp.Formats.Gif;
using SixLabors.ImageSharp.PixelFormats;
namespace SixLabors.ImageSharp
diff --git a/src/ImageSharp/Formats/Gif/LzwDecoder.cs b/src/ImageSharp/Formats/Gif/LzwDecoder.cs
index fcc50fe5c4..b8f12f930a 100644
--- a/src/ImageSharp/Formats/Gif/LzwDecoder.cs
+++ b/src/ImageSharp/Formats/Gif/LzwDecoder.cs
@@ -5,7 +5,7 @@ using System;
using System.Buffers;
using System.IO;
-namespace SixLabors.ImageSharp.Formats
+namespace SixLabors.ImageSharp.Formats.Gif
{
///
/// Decompresses and decodes data using the dynamic LZW algorithms.
diff --git a/src/ImageSharp/Formats/Gif/LzwEncoder.cs b/src/ImageSharp/Formats/Gif/LzwEncoder.cs
index e7865f9137..b7bfd0fd25 100644
--- a/src/ImageSharp/Formats/Gif/LzwEncoder.cs
+++ b/src/ImageSharp/Formats/Gif/LzwEncoder.cs
@@ -5,7 +5,7 @@ using System;
using System.Buffers;
using System.IO;
-namespace SixLabors.ImageSharp.Formats
+namespace SixLabors.ImageSharp.Formats.Gif
{
///
/// Encodes and compresses the image data using dynamic Lempel-Ziv compression.
diff --git a/src/ImageSharp/Formats/Gif/PackedField.cs b/src/ImageSharp/Formats/Gif/PackedField.cs
index d0489a13c7..962e2082bf 100644
--- a/src/ImageSharp/Formats/Gif/PackedField.cs
+++ b/src/ImageSharp/Formats/Gif/PackedField.cs
@@ -3,7 +3,7 @@
using System;
-namespace SixLabors.ImageSharp.Formats
+namespace SixLabors.ImageSharp.Formats.Gif
{
///
/// Represents a byte of data in a GIF data stream which contains a number
diff --git a/src/ImageSharp/Formats/Gif/Sections/GifGraphicsControlExtension.cs b/src/ImageSharp/Formats/Gif/Sections/GifGraphicsControlExtension.cs
index 13a1fb6a8f..8cdd309d30 100644
--- a/src/ImageSharp/Formats/Gif/Sections/GifGraphicsControlExtension.cs
+++ b/src/ImageSharp/Formats/Gif/Sections/GifGraphicsControlExtension.cs
@@ -1,7 +1,7 @@
// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
-namespace SixLabors.ImageSharp.Formats
+namespace SixLabors.ImageSharp.Formats.Gif
{
///
/// The Graphic Control Extension contains parameters used when
diff --git a/src/ImageSharp/Formats/Gif/Sections/GifImageDescriptor.cs b/src/ImageSharp/Formats/Gif/Sections/GifImageDescriptor.cs
index 8765c9deaf..2ed9e47470 100644
--- a/src/ImageSharp/Formats/Gif/Sections/GifImageDescriptor.cs
+++ b/src/ImageSharp/Formats/Gif/Sections/GifImageDescriptor.cs
@@ -1,7 +1,7 @@
// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
-namespace SixLabors.ImageSharp.Formats
+namespace SixLabors.ImageSharp.Formats.Gif
{
///
/// Each image in the Data Stream is composed of an Image Descriptor,
diff --git a/src/ImageSharp/Formats/Gif/Sections/GifLogicalScreenDescriptor.cs b/src/ImageSharp/Formats/Gif/Sections/GifLogicalScreenDescriptor.cs
index 28983fa3f7..b1109c3e25 100644
--- a/src/ImageSharp/Formats/Gif/Sections/GifLogicalScreenDescriptor.cs
+++ b/src/ImageSharp/Formats/Gif/Sections/GifLogicalScreenDescriptor.cs
@@ -1,7 +1,7 @@
// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
-namespace SixLabors.ImageSharp.Formats
+namespace SixLabors.ImageSharp.Formats.Gif
{
///
/// The Logical Screen Descriptor contains the parameters
diff --git a/src/ImageSharp/Formats/Jpeg/Common/UnzigData.cs b/src/ImageSharp/Formats/Jpeg/Common/UnzigData.cs
index d781238278..aaefbb3af9 100644
--- a/src/ImageSharp/Formats/Jpeg/Common/UnzigData.cs
+++ b/src/ImageSharp/Formats/Jpeg/Common/UnzigData.cs
@@ -3,7 +3,7 @@
using System;
using System.Runtime.InteropServices;
-namespace SixLabors.ImageSharp.Formats
+namespace SixLabors.ImageSharp.Formats.Jpeg.Common
{
///
/// Holds the Jpeg UnZig array in a value/stack type.
diff --git a/src/ImageSharp/Formats/Jpeg/GolangPort/Components/Decoder/JpegBlockProcessor.cs b/src/ImageSharp/Formats/Jpeg/GolangPort/Components/Decoder/JpegBlockProcessor.cs
index acff386149..ba4a421271 100644
--- a/src/ImageSharp/Formats/Jpeg/GolangPort/Components/Decoder/JpegBlockProcessor.cs
+++ b/src/ImageSharp/Formats/Jpeg/GolangPort/Components/Decoder/JpegBlockProcessor.cs
@@ -2,6 +2,7 @@
// Licensed under the Apache License, Version 2.0.
using System.Runtime.InteropServices;
+using SixLabors.ImageSharp.Formats.Jpeg.Common;
using SixLabors.ImageSharp.Memory;
using Block8x8F = SixLabors.ImageSharp.Formats.Jpeg.Common.Block8x8F;
diff --git a/src/ImageSharp/Formats/Jpeg/GolangPort/Components/Decoder/OldJpegScanDecoder.ComputationData.cs b/src/ImageSharp/Formats/Jpeg/GolangPort/Components/Decoder/OldJpegScanDecoder.ComputationData.cs
index 268ae8cb52..8f999bbef2 100644
--- a/src/ImageSharp/Formats/Jpeg/GolangPort/Components/Decoder/OldJpegScanDecoder.ComputationData.cs
+++ b/src/ImageSharp/Formats/Jpeg/GolangPort/Components/Decoder/OldJpegScanDecoder.ComputationData.cs
@@ -2,6 +2,7 @@
// Licensed under the Apache License, Version 2.0.
using System.Runtime.InteropServices;
+using SixLabors.ImageSharp.Formats.Jpeg.Common;
using Block8x8F = SixLabors.ImageSharp.Formats.Jpeg.Common.Block8x8F;
namespace SixLabors.ImageSharp.Formats.Jpeg.GolangPort.Components.Decoder
diff --git a/src/ImageSharp/Formats/Jpeg/GolangPort/JpegEncoderCore.cs b/src/ImageSharp/Formats/Jpeg/GolangPort/JpegEncoderCore.cs
index cb9d73bd0f..229b8b7b5a 100644
--- a/src/ImageSharp/Formats/Jpeg/GolangPort/JpegEncoderCore.cs
+++ b/src/ImageSharp/Formats/Jpeg/GolangPort/JpegEncoderCore.cs
@@ -4,9 +4,12 @@
using System.Buffers;
using System.IO;
using System.Runtime.CompilerServices;
+using SixLabors.ImageSharp.Formats.Jpeg.Common;
using SixLabors.ImageSharp.Formats.Jpeg.GolangPort.Components;
using SixLabors.ImageSharp.Formats.Jpeg.GolangPort.Components.Encoder;
using SixLabors.ImageSharp.Formats.Jpeg.GolangPort.Utils;
+using SixLabors.ImageSharp.MetaData.Profiles.Exif;
+using SixLabors.ImageSharp.MetaData.Profiles.Icc;
using SixLabors.ImageSharp.PixelFormats;
using Block8x8F = SixLabors.ImageSharp.Formats.Jpeg.Common.Block8x8F;
diff --git a/src/ImageSharp/Formats/Jpeg/GolangPort/OldJpegDecoderCore.cs b/src/ImageSharp/Formats/Jpeg/GolangPort/OldJpegDecoderCore.cs
index dc6ff81476..765c5f39aa 100644
--- a/src/ImageSharp/Formats/Jpeg/GolangPort/OldJpegDecoderCore.cs
+++ b/src/ImageSharp/Formats/Jpeg/GolangPort/OldJpegDecoderCore.cs
@@ -7,6 +7,9 @@ using System.Runtime.CompilerServices;
using System.Threading.Tasks;
using SixLabors.ImageSharp.Formats.Jpeg.GolangPort.Components.Decoder;
using SixLabors.ImageSharp.Memory;
+using SixLabors.ImageSharp.MetaData;
+using SixLabors.ImageSharp.MetaData.Profiles.Exif;
+using SixLabors.ImageSharp.MetaData.Profiles.Icc;
using SixLabors.ImageSharp.PixelFormats;
using Block8x8F = SixLabors.ImageSharp.Formats.Jpeg.Common.Block8x8F;
diff --git a/src/ImageSharp/Formats/Jpeg/IJpegDecoderOptions.cs b/src/ImageSharp/Formats/Jpeg/IJpegDecoderOptions.cs
index 4cbd8379a7..880a7f7a3f 100644
--- a/src/ImageSharp/Formats/Jpeg/IJpegDecoderOptions.cs
+++ b/src/ImageSharp/Formats/Jpeg/IJpegDecoderOptions.cs
@@ -6,7 +6,7 @@ using System.Collections.Generic;
using System.IO;
using SixLabors.ImageSharp.PixelFormats;
-namespace SixLabors.ImageSharp.Formats
+namespace SixLabors.ImageSharp.Formats.Jpeg
{
///
/// Image decoder for generating an image out of a jpg stream.
diff --git a/src/ImageSharp/Formats/Jpeg/IJpegEncoderOptions.cs b/src/ImageSharp/Formats/Jpeg/IJpegEncoderOptions.cs
index 7867056bfc..a84652cefe 100644
--- a/src/ImageSharp/Formats/Jpeg/IJpegEncoderOptions.cs
+++ b/src/ImageSharp/Formats/Jpeg/IJpegEncoderOptions.cs
@@ -6,7 +6,7 @@ using System.Collections.Generic;
using System.IO;
using SixLabors.ImageSharp.PixelFormats;
-namespace SixLabors.ImageSharp.Formats
+namespace SixLabors.ImageSharp.Formats.Jpeg
{
///
/// Encoder for writing the data image to a stream in jpeg format.
diff --git a/src/ImageSharp/Formats/Jpeg/ImageExtensions.cs b/src/ImageSharp/Formats/Jpeg/ImageExtensions.cs
index e0ae0c5a39..c7d7b26da6 100644
--- a/src/ImageSharp/Formats/Jpeg/ImageExtensions.cs
+++ b/src/ImageSharp/Formats/Jpeg/ImageExtensions.cs
@@ -4,6 +4,7 @@
using System;
using System.IO;
using SixLabors.ImageSharp.Formats;
+using SixLabors.ImageSharp.Formats.Jpeg;
using SixLabors.ImageSharp.PixelFormats;
namespace SixLabors.ImageSharp
diff --git a/src/ImageSharp/Formats/Jpeg/JpegConfigurationModule.cs b/src/ImageSharp/Formats/Jpeg/JpegConfigurationModule.cs
index 43f56caecd..1ab5093398 100644
--- a/src/ImageSharp/Formats/Jpeg/JpegConfigurationModule.cs
+++ b/src/ImageSharp/Formats/Jpeg/JpegConfigurationModule.cs
@@ -1,7 +1,7 @@
// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
-namespace SixLabors.ImageSharp.Formats
+namespace SixLabors.ImageSharp.Formats.Jpeg
{
///
/// Registers the image encoders, decoders and mime type detectors for the jpeg format.
diff --git a/src/ImageSharp/Formats/Jpeg/JpegDecoder.cs b/src/ImageSharp/Formats/Jpeg/JpegDecoder.cs
index dd185f26a5..38f1d7dbc7 100644
--- a/src/ImageSharp/Formats/Jpeg/JpegDecoder.cs
+++ b/src/ImageSharp/Formats/Jpeg/JpegDecoder.cs
@@ -5,7 +5,7 @@ using System.IO;
using SixLabors.ImageSharp.Formats.Jpeg.PdfJsPort;
using SixLabors.ImageSharp.PixelFormats;
-namespace SixLabors.ImageSharp.Formats
+namespace SixLabors.ImageSharp.Formats.Jpeg
{
///
/// Image decoder for generating an image out of a jpg stream.
diff --git a/src/ImageSharp/Formats/Jpeg/JpegEncoder.cs b/src/ImageSharp/Formats/Jpeg/JpegEncoder.cs
index f95ba002bd..3d79faabce 100644
--- a/src/ImageSharp/Formats/Jpeg/JpegEncoder.cs
+++ b/src/ImageSharp/Formats/Jpeg/JpegEncoder.cs
@@ -5,7 +5,7 @@ using System.IO;
using SixLabors.ImageSharp.Formats.Jpeg.GolangPort;
using SixLabors.ImageSharp.PixelFormats;
-namespace SixLabors.ImageSharp.Formats
+namespace SixLabors.ImageSharp.Formats.Jpeg
{
///
/// Encoder for writing the data image to a stream in jpeg format.
diff --git a/src/ImageSharp/Formats/Jpeg/JpegFormat.cs b/src/ImageSharp/Formats/Jpeg/JpegFormat.cs
index 2b7cd79789..8dd59ac203 100644
--- a/src/ImageSharp/Formats/Jpeg/JpegFormat.cs
+++ b/src/ImageSharp/Formats/Jpeg/JpegFormat.cs
@@ -4,7 +4,7 @@
using System.Collections.Generic;
using SixLabors.ImageSharp.Formats.Jpeg.GolangPort;
-namespace SixLabors.ImageSharp.Formats
+namespace SixLabors.ImageSharp.Formats.Jpeg
{
///
/// Registers the image encoders, decoders and mime type detectors for the jpeg format.
diff --git a/src/ImageSharp/Formats/Jpeg/JpegImageFormatDetector.cs b/src/ImageSharp/Formats/Jpeg/JpegImageFormatDetector.cs
index 32bd904f03..d888986f39 100644
--- a/src/ImageSharp/Formats/Jpeg/JpegImageFormatDetector.cs
+++ b/src/ImageSharp/Formats/Jpeg/JpegImageFormatDetector.cs
@@ -3,7 +3,7 @@
using System;
-namespace SixLabors.ImageSharp.Formats
+namespace SixLabors.ImageSharp.Formats.Jpeg
{
///
/// Detects Jpeg file headers
diff --git a/src/ImageSharp/Formats/Jpeg/JpegSubsample.cs b/src/ImageSharp/Formats/Jpeg/JpegSubsample.cs
index 971a749314..8558157059 100644
--- a/src/ImageSharp/Formats/Jpeg/JpegSubsample.cs
+++ b/src/ImageSharp/Formats/Jpeg/JpegSubsample.cs
@@ -1,7 +1,7 @@
// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
-namespace SixLabors.ImageSharp.Formats
+namespace SixLabors.ImageSharp.Formats.Jpeg
{
///
/// Enumerates the chroma subsampling method applied to the image.
diff --git a/src/ImageSharp/Formats/Jpeg/PdfJsPort/JpegDecoderCore.cs b/src/ImageSharp/Formats/Jpeg/PdfJsPort/JpegDecoderCore.cs
index dcdde1feb7..95adb70fb9 100644
--- a/src/ImageSharp/Formats/Jpeg/PdfJsPort/JpegDecoderCore.cs
+++ b/src/ImageSharp/Formats/Jpeg/PdfJsPort/JpegDecoderCore.cs
@@ -6,6 +6,9 @@ using System.IO;
using System.Runtime.CompilerServices;
using SixLabors.ImageSharp.Formats.Jpeg.PdfJsPort.Components;
using SixLabors.ImageSharp.Memory;
+using SixLabors.ImageSharp.MetaData;
+using SixLabors.ImageSharp.MetaData.Profiles.Exif;
+using SixLabors.ImageSharp.MetaData.Profiles.Icc;
using SixLabors.ImageSharp.PixelFormats;
namespace SixLabors.ImageSharp.Formats.Jpeg.PdfJsPort
diff --git a/src/ImageSharp/Formats/Png/Filters/AverageFilter.cs b/src/ImageSharp/Formats/Png/Filters/AverageFilter.cs
index 061fea8a40..d66aa06dd6 100644
--- a/src/ImageSharp/Formats/Png/Filters/AverageFilter.cs
+++ b/src/ImageSharp/Formats/Png/Filters/AverageFilter.cs
@@ -4,7 +4,7 @@
using System;
using System.Runtime.CompilerServices;
-namespace SixLabors.ImageSharp.Formats
+namespace SixLabors.ImageSharp.Formats.Png.Filters
{
///
/// The Average filter uses the average of the two neighboring pixels (left and above) to predict
diff --git a/src/ImageSharp/Formats/Png/Filters/FilterType.cs b/src/ImageSharp/Formats/Png/Filters/FilterType.cs
index 33fc646568..83a005380a 100644
--- a/src/ImageSharp/Formats/Png/Filters/FilterType.cs
+++ b/src/ImageSharp/Formats/Png/Filters/FilterType.cs
@@ -1,7 +1,7 @@
// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
-namespace SixLabors.ImageSharp.Formats
+namespace SixLabors.ImageSharp.Formats.Png.Filters
{
///
/// Provides enumeration of the various PNG filter types.
diff --git a/src/ImageSharp/Formats/Png/Filters/NoneFilter.cs b/src/ImageSharp/Formats/Png/Filters/NoneFilter.cs
index be3c06d70b..0164ceafaa 100644
--- a/src/ImageSharp/Formats/Png/Filters/NoneFilter.cs
+++ b/src/ImageSharp/Formats/Png/Filters/NoneFilter.cs
@@ -5,7 +5,7 @@ using System;
using System.Runtime.CompilerServices;
using SixLabors.ImageSharp.Memory;
-namespace SixLabors.ImageSharp.Formats
+namespace SixLabors.ImageSharp.Formats.Png.Filters
{
///
/// The None filter, the scanline is transmitted unmodified; it is only necessary to
diff --git a/src/ImageSharp/Formats/Png/Filters/PaethFilter.cs b/src/ImageSharp/Formats/Png/Filters/PaethFilter.cs
index 6db580534c..5b41558cde 100644
--- a/src/ImageSharp/Formats/Png/Filters/PaethFilter.cs
+++ b/src/ImageSharp/Formats/Png/Filters/PaethFilter.cs
@@ -4,7 +4,7 @@
using System;
using System.Runtime.CompilerServices;
-namespace SixLabors.ImageSharp.Formats
+namespace SixLabors.ImageSharp.Formats.Png.Filters
{
///
/// The Paeth filter computes a simple linear function of the three neighboring pixels (left, above, upper left),
diff --git a/src/ImageSharp/Formats/Png/Filters/SubFilter.cs b/src/ImageSharp/Formats/Png/Filters/SubFilter.cs
index 62cc57718b..43607dcdd0 100644
--- a/src/ImageSharp/Formats/Png/Filters/SubFilter.cs
+++ b/src/ImageSharp/Formats/Png/Filters/SubFilter.cs
@@ -4,7 +4,7 @@
using System;
using System.Runtime.CompilerServices;
-namespace SixLabors.ImageSharp.Formats
+namespace SixLabors.ImageSharp.Formats.Png.Filters
{
///
/// The Sub filter transmits the difference between each byte and the value of the corresponding byte
diff --git a/src/ImageSharp/Formats/Png/Filters/UpFilter.cs b/src/ImageSharp/Formats/Png/Filters/UpFilter.cs
index a2051d33ff..12a566e32e 100644
--- a/src/ImageSharp/Formats/Png/Filters/UpFilter.cs
+++ b/src/ImageSharp/Formats/Png/Filters/UpFilter.cs
@@ -4,7 +4,7 @@
using System;
using System.Runtime.CompilerServices;
-namespace SixLabors.ImageSharp.Formats
+namespace SixLabors.ImageSharp.Formats.Png.Filters
{
///
/// The Up filter is just like the Sub filter except that the pixel immediately above the current pixel,
diff --git a/src/ImageSharp/Formats/Png/IPngDecoderOptions.cs b/src/ImageSharp/Formats/Png/IPngDecoderOptions.cs
index c612a7159b..e51cc084b2 100644
--- a/src/ImageSharp/Formats/Png/IPngDecoderOptions.cs
+++ b/src/ImageSharp/Formats/Png/IPngDecoderOptions.cs
@@ -7,7 +7,7 @@ using System.IO;
using System.Text;
using SixLabors.ImageSharp.PixelFormats;
-namespace SixLabors.ImageSharp.Formats
+namespace SixLabors.ImageSharp.Formats.Png
{
///
/// The optioas for decoding png images
diff --git a/src/ImageSharp/Formats/Png/IPngEncoderOptions.cs b/src/ImageSharp/Formats/Png/IPngEncoderOptions.cs
index 73d7a393b4..6b4b05e311 100644
--- a/src/ImageSharp/Formats/Png/IPngEncoderOptions.cs
+++ b/src/ImageSharp/Formats/Png/IPngEncoderOptions.cs
@@ -6,7 +6,7 @@ using System.IO;
using SixLabors.ImageSharp.PixelFormats;
using SixLabors.ImageSharp.Quantizers;
-namespace SixLabors.ImageSharp.Formats
+namespace SixLabors.ImageSharp.Formats.Png
{
///
/// The options availible for manipulating the encoder pipeline
diff --git a/src/ImageSharp/Formats/Png/ImageExtensions.cs b/src/ImageSharp/Formats/Png/ImageExtensions.cs
index 70815e0faf..5d7539915c 100644
--- a/src/ImageSharp/Formats/Png/ImageExtensions.cs
+++ b/src/ImageSharp/Formats/Png/ImageExtensions.cs
@@ -3,6 +3,7 @@
using System.IO;
using SixLabors.ImageSharp.Formats;
+using SixLabors.ImageSharp.Formats.Png;
using SixLabors.ImageSharp.PixelFormats;
namespace SixLabors.ImageSharp
diff --git a/src/ImageSharp/Formats/Png/PngChunk.cs b/src/ImageSharp/Formats/Png/PngChunk.cs
index 9e7357f00a..f90def5b38 100644
--- a/src/ImageSharp/Formats/Png/PngChunk.cs
+++ b/src/ImageSharp/Formats/Png/PngChunk.cs
@@ -1,7 +1,7 @@
// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
-namespace SixLabors.ImageSharp.Formats
+namespace SixLabors.ImageSharp.Formats.Png
{
///
/// Stores header information about a chunk.
diff --git a/src/ImageSharp/Formats/Png/PngChunkTypes.cs b/src/ImageSharp/Formats/Png/PngChunkTypes.cs
index b501783d54..e22f4f0e7d 100644
--- a/src/ImageSharp/Formats/Png/PngChunkTypes.cs
+++ b/src/ImageSharp/Formats/Png/PngChunkTypes.cs
@@ -1,7 +1,7 @@
// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
-namespace SixLabors.ImageSharp.Formats
+namespace SixLabors.ImageSharp.Formats.Png
{
///
/// Contains a list of possible chunk type identifiers.
diff --git a/src/ImageSharp/Formats/Png/PngColorType.cs b/src/ImageSharp/Formats/Png/PngColorType.cs
index 093edaddd9..fc376ca161 100644
--- a/src/ImageSharp/Formats/Png/PngColorType.cs
+++ b/src/ImageSharp/Formats/Png/PngColorType.cs
@@ -1,7 +1,7 @@
// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
-namespace SixLabors.ImageSharp.Formats
+namespace SixLabors.ImageSharp.Formats.Png
{
///
/// Provides enumeration of available PNG color types.
diff --git a/src/ImageSharp/Formats/Png/PngConfigurationModule.cs b/src/ImageSharp/Formats/Png/PngConfigurationModule.cs
index c362e19529..9346f7567e 100644
--- a/src/ImageSharp/Formats/Png/PngConfigurationModule.cs
+++ b/src/ImageSharp/Formats/Png/PngConfigurationModule.cs
@@ -1,7 +1,7 @@
// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
-namespace SixLabors.ImageSharp.Formats
+namespace SixLabors.ImageSharp.Formats.Png
{
///
/// Registers the image encoders, decoders and mime type detectors for the png format.
diff --git a/src/ImageSharp/Formats/Png/PngConstants.cs b/src/ImageSharp/Formats/Png/PngConstants.cs
index 3c8992a540..8b4ad39f28 100644
--- a/src/ImageSharp/Formats/Png/PngConstants.cs
+++ b/src/ImageSharp/Formats/Png/PngConstants.cs
@@ -4,7 +4,7 @@
using System.Collections.Generic;
using System.Text;
-namespace SixLabors.ImageSharp.Formats
+namespace SixLabors.ImageSharp.Formats.Png
{
///
/// Defines png constants defined in the specification.
diff --git a/src/ImageSharp/Formats/Png/PngDecoder.cs b/src/ImageSharp/Formats/Png/PngDecoder.cs
index da3a2f139c..786f3fe901 100644
--- a/src/ImageSharp/Formats/Png/PngDecoder.cs
+++ b/src/ImageSharp/Formats/Png/PngDecoder.cs
@@ -7,7 +7,7 @@ using System.IO;
using System.Text;
using SixLabors.ImageSharp.PixelFormats;
-namespace SixLabors.ImageSharp.Formats
+namespace SixLabors.ImageSharp.Formats.Png
{
///
/// Encoder for generating an image out of a png encoded stream.
diff --git a/src/ImageSharp/Formats/Png/PngDecoderCore.cs b/src/ImageSharp/Formats/Png/PngDecoderCore.cs
index 75ca69684a..2427da2572 100644
--- a/src/ImageSharp/Formats/Png/PngDecoderCore.cs
+++ b/src/ImageSharp/Formats/Png/PngDecoderCore.cs
@@ -8,11 +8,14 @@ using System.IO;
using System.Linq;
using System.Runtime.CompilerServices;
using System.Text;
+using SixLabors.ImageSharp.Formats.Png.Filters;
+using SixLabors.ImageSharp.Formats.Png.Zlib;
using SixLabors.ImageSharp.Memory;
+using SixLabors.ImageSharp.MetaData;
using SixLabors.ImageSharp.PixelFormats;
using static SixLabors.ImageSharp.ComparableExtensions;
-namespace SixLabors.ImageSharp.Formats
+namespace SixLabors.ImageSharp.Formats.Png
{
///
/// Performs the png decoding operation.
diff --git a/src/ImageSharp/Formats/Png/PngEncoder.cs b/src/ImageSharp/Formats/Png/PngEncoder.cs
index 583d77a8ab..6b2410e837 100644
--- a/src/ImageSharp/Formats/Png/PngEncoder.cs
+++ b/src/ImageSharp/Formats/Png/PngEncoder.cs
@@ -6,7 +6,7 @@ using System.IO;
using SixLabors.ImageSharp.PixelFormats;
using SixLabors.ImageSharp.Quantizers;
-namespace SixLabors.ImageSharp.Formats
+namespace SixLabors.ImageSharp.Formats.Png
{
///
/// Image encoder for writing image data to a stream in png format.
diff --git a/src/ImageSharp/Formats/Png/PngEncoderCore.cs b/src/ImageSharp/Formats/Png/PngEncoderCore.cs
index cee62fde36..5e6e77316c 100644
--- a/src/ImageSharp/Formats/Png/PngEncoderCore.cs
+++ b/src/ImageSharp/Formats/Png/PngEncoderCore.cs
@@ -6,12 +6,14 @@ using System.Buffers;
using System.IO;
using System.Linq;
using System.Runtime.CompilerServices;
+using SixLabors.ImageSharp.Formats.Png.Filters;
+using SixLabors.ImageSharp.Formats.Png.Zlib;
using SixLabors.ImageSharp.Memory;
using SixLabors.ImageSharp.PixelFormats;
using SixLabors.ImageSharp.Quantizers;
using static SixLabors.ImageSharp.ComparableExtensions;
-namespace SixLabors.ImageSharp.Formats
+namespace SixLabors.ImageSharp.Formats.Png
{
///
/// Performs the png encoding operation.
diff --git a/src/ImageSharp/Formats/Png/PngFormat.cs b/src/ImageSharp/Formats/Png/PngFormat.cs
index 9cfa660126..142f660712 100644
--- a/src/ImageSharp/Formats/Png/PngFormat.cs
+++ b/src/ImageSharp/Formats/Png/PngFormat.cs
@@ -3,7 +3,7 @@
using System.Collections.Generic;
-namespace SixLabors.ImageSharp.Formats
+namespace SixLabors.ImageSharp.Formats.Png
{
///
/// Registers the image encoders, decoders and mime type detectors for the png format.
diff --git a/src/ImageSharp/Formats/Png/PngHeader.cs b/src/ImageSharp/Formats/Png/PngHeader.cs
index 3bbf10526a..a70032ce3c 100644
--- a/src/ImageSharp/Formats/Png/PngHeader.cs
+++ b/src/ImageSharp/Formats/Png/PngHeader.cs
@@ -1,7 +1,7 @@
// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
-namespace SixLabors.ImageSharp.Formats
+namespace SixLabors.ImageSharp.Formats.Png
{
///
/// Represents the png header chunk.
diff --git a/src/ImageSharp/Formats/Png/PngImageFormatDetector.cs b/src/ImageSharp/Formats/Png/PngImageFormatDetector.cs
index bf4a91caf2..837a147ed3 100644
--- a/src/ImageSharp/Formats/Png/PngImageFormatDetector.cs
+++ b/src/ImageSharp/Formats/Png/PngImageFormatDetector.cs
@@ -3,7 +3,7 @@
using System;
-namespace SixLabors.ImageSharp.Formats
+namespace SixLabors.ImageSharp.Formats.Png
{
///
/// Detects png file headers
diff --git a/src/ImageSharp/Formats/Png/PngInterlaceMode.cs b/src/ImageSharp/Formats/Png/PngInterlaceMode.cs
index a39ccd6bed..10ebcc7bbe 100644
--- a/src/ImageSharp/Formats/Png/PngInterlaceMode.cs
+++ b/src/ImageSharp/Formats/Png/PngInterlaceMode.cs
@@ -1,7 +1,7 @@
// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
-namespace SixLabors.ImageSharp.Formats
+namespace SixLabors.ImageSharp.Formats.Png
{
///
/// Provides enumeration of available PNG interlace modes.
diff --git a/src/ImageSharp/Formats/Png/Zlib/Adler32.cs b/src/ImageSharp/Formats/Png/Zlib/Adler32.cs
index d0ddd84405..6841c1cb82 100644
--- a/src/ImageSharp/Formats/Png/Zlib/Adler32.cs
+++ b/src/ImageSharp/Formats/Png/Zlib/Adler32.cs
@@ -3,7 +3,7 @@
using System;
-namespace SixLabors.ImageSharp.Formats
+namespace SixLabors.ImageSharp.Formats.Png.Zlib
{
///
/// Computes Adler32 checksum for a stream of data. An Adler32
diff --git a/src/ImageSharp/Formats/Png/Zlib/Crc32.cs b/src/ImageSharp/Formats/Png/Zlib/Crc32.cs
index 7ca0f668b5..14a29b7aff 100644
--- a/src/ImageSharp/Formats/Png/Zlib/Crc32.cs
+++ b/src/ImageSharp/Formats/Png/Zlib/Crc32.cs
@@ -3,7 +3,7 @@
using System;
-namespace SixLabors.ImageSharp.Formats
+namespace SixLabors.ImageSharp.Formats.Png.Zlib
{
///
/// Generate a table for a byte-wise 32-bit CRC calculation on the polynomial:
diff --git a/src/ImageSharp/Formats/Png/Zlib/IChecksum.cs b/src/ImageSharp/Formats/Png/Zlib/IChecksum.cs
index 4b656ab9cd..9d84258cae 100644
--- a/src/ImageSharp/Formats/Png/Zlib/IChecksum.cs
+++ b/src/ImageSharp/Formats/Png/Zlib/IChecksum.cs
@@ -1,7 +1,7 @@
// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
-namespace SixLabors.ImageSharp.Formats
+namespace SixLabors.ImageSharp.Formats.Png.Zlib
{
///
/// Interface to compute a data checksum used by checked input/output streams.
diff --git a/src/ImageSharp/Formats/Png/Zlib/ZlibDeflateStream.cs b/src/ImageSharp/Formats/Png/Zlib/ZlibDeflateStream.cs
index 11ddb10730..dd20886ff7 100644
--- a/src/ImageSharp/Formats/Png/Zlib/ZlibDeflateStream.cs
+++ b/src/ImageSharp/Formats/Png/Zlib/ZlibDeflateStream.cs
@@ -5,7 +5,7 @@ using System;
using System.IO;
using System.IO.Compression;
-namespace SixLabors.ImageSharp.Formats
+namespace SixLabors.ImageSharp.Formats.Png.Zlib
{
///
/// Provides methods and properties for compressing streams by using the Zlib Deflate algorithm.
diff --git a/src/ImageSharp/Formats/Png/Zlib/ZlibInflateStream.cs b/src/ImageSharp/Formats/Png/Zlib/ZlibInflateStream.cs
index d668ff4176..36d1d62e71 100644
--- a/src/ImageSharp/Formats/Png/Zlib/ZlibInflateStream.cs
+++ b/src/ImageSharp/Formats/Png/Zlib/ZlibInflateStream.cs
@@ -7,7 +7,7 @@ using System.IO;
using System.IO.Compression;
using System.Text;
-namespace SixLabors.ImageSharp.Formats
+namespace SixLabors.ImageSharp.Formats.Png.Zlib
{
///
/// Provides methods and properties for deframing streams from PNGs.
diff --git a/src/ImageSharp/IO/IFileSystem.cs b/src/ImageSharp/IO/IFileSystem.cs
index 072c05ea7f..088d4abb8b 100644
--- a/src/ImageSharp/IO/IFileSystem.cs
+++ b/src/ImageSharp/IO/IFileSystem.cs
@@ -9,7 +9,7 @@ namespace SixLabors.ImageSharp.IO
///
/// A simple interface representing the filesystem.
///
- public interface IFileSystem
+ internal interface IFileSystem
{
///
/// Returns a readable stream as defined by the path.
diff --git a/src/ImageSharp/IO/LocalFileSystem.cs b/src/ImageSharp/IO/LocalFileSystem.cs
index 9c419698ff..204f5f4e1e 100644
--- a/src/ImageSharp/IO/LocalFileSystem.cs
+++ b/src/ImageSharp/IO/LocalFileSystem.cs
@@ -12,7 +12,7 @@ namespace SixLabors.ImageSharp.IO
///
/// A wrapper around the local File apis.
///
- public class LocalFileSystem : IFileSystem
+ internal class LocalFileSystem : IFileSystem
{
///
public Stream OpenRead(string path)
diff --git a/src/ImageSharp/Image/IImage.cs b/src/ImageSharp/Image/IImage.cs
index 6e05757276..3223e20f75 100644
--- a/src/ImageSharp/Image/IImage.cs
+++ b/src/ImageSharp/Image/IImage.cs
@@ -2,6 +2,7 @@
// Licensed under the Apache License, Version 2.0.
using SixLabors.ImageSharp.Formats;
+using SixLabors.ImageSharp.MetaData;
namespace SixLabors.ImageSharp
{
diff --git a/src/ImageSharp/Image/IImageFrame.cs b/src/ImageSharp/Image/IImageFrame.cs
index 3d23d6e09a..31a8165887 100644
--- a/src/ImageSharp/Image/IImageFrame.cs
+++ b/src/ImageSharp/Image/IImageFrame.cs
@@ -1,6 +1,8 @@
// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
+using SixLabors.ImageSharp.MetaData;
+
namespace SixLabors.ImageSharp
{
///
diff --git a/src/ImageSharp/Image/IImageProcessor.cs b/src/ImageSharp/Image/IImageProcessor.cs
index 5eec31b478..b81f08e150 100644
--- a/src/ImageSharp/Image/IImageProcessor.cs
+++ b/src/ImageSharp/Image/IImageProcessor.cs
@@ -1,12 +1,10 @@
// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
-using System;
-using System.Threading.Tasks;
using SixLabors.ImageSharp.PixelFormats;
using SixLabors.Primitives;
-namespace SixLabors.ImageSharp.Processing
+namespace SixLabors.ImageSharp
{
///
/// Encapsulates methods to alter the pixels of an image.
@@ -15,17 +13,6 @@ namespace SixLabors.ImageSharp.Processing
public interface IImageProcessor
where TPixel : struct, IPixel
{
- ///
- /// Gets or sets the parallel options for processing tasks in parallel.
- ///
- ParallelOptions ParallelOptions { get; set; }
-
- ///
- /// Gets or sets a value indicating whether to compress
- /// or expand individual pixel colors the value on processing.
- ///
- bool Compand { get; set; }
-
///
/// Applies the process to the specified portion of the specified .
///
diff --git a/src/ImageSharp/Image/ImageBase{TPixel}.cs b/src/ImageSharp/Image/ImageBase{TPixel}.cs
index db8964fa31..783d5d5646 100644
--- a/src/ImageSharp/Image/ImageBase{TPixel}.cs
+++ b/src/ImageSharp/Image/ImageBase{TPixel}.cs
@@ -19,16 +19,6 @@ namespace SixLabors.ImageSharp
public abstract class ImageBase : IImageBase
where TPixel : struct, IPixel
{
- ///
- /// Gets or sets the maximum allowable width in pixels.
- ///
- public const int MaxWidth = int.MaxValue;
-
- ///
- /// Gets or sets the maximum allowable height in pixels.
- ///
- public const int MaxHeight = int.MaxValue;
-
#pragma warning disable SA1401 // Fields must be private
///
/// The image pixels. Not private as Buffer2D requires an array in its constructor.
@@ -186,7 +176,7 @@ namespace SixLabors.ImageSharp
/// A new items which is a clone of the original.
public ImageBase Clone()
{
- return this.CloneInternal();
+ return this.CloneImageBase();
}
///
@@ -266,7 +256,7 @@ namespace SixLabors.ImageSharp
/// Clones the image
///
/// A new items which is a clone of the original.
- protected abstract ImageBase CloneInternal();
+ protected abstract ImageBase CloneImageBase();
///
/// Copies the properties from the other .
@@ -281,14 +271,6 @@ namespace SixLabors.ImageSharp
this.Configuration = other.Configuration;
}
- ///
- /// Releases any unmanaged resources from the inheriting class.
- ///
- protected virtual void ReleaseUnmanagedResources()
- {
- // TODO release unmanaged resources here
- }
-
///
/// Disposes the object and frees resources for the Garbage Collector.
///
@@ -300,8 +282,6 @@ namespace SixLabors.ImageSharp
return;
}
- this.ReleaseUnmanagedResources();
-
if (disposing)
{
this.ReturnPixels();
diff --git a/src/ImageSharp/Image/ImageFrame{TPixel}.cs b/src/ImageSharp/Image/ImageFrame{TPixel}.cs
index 333fd9c5f2..bd5e272618 100644
--- a/src/ImageSharp/Image/ImageFrame{TPixel}.cs
+++ b/src/ImageSharp/Image/ImageFrame{TPixel}.cs
@@ -4,6 +4,7 @@
using System;
using System.Numerics;
using System.Threading.Tasks;
+using SixLabors.ImageSharp.MetaData;
using SixLabors.ImageSharp.PixelFormats;
namespace SixLabors.ImageSharp
@@ -136,7 +137,7 @@ namespace SixLabors.ImageSharp
}
///
- protected override ImageBase CloneInternal()
+ protected override ImageBase CloneImageBase()
{
return this.Clone();
}
diff --git a/src/ImageSharp/Image/Image{TPixel}.cs b/src/ImageSharp/Image/Image{TPixel}.cs
index 47ddfac210..900045dbad 100644
--- a/src/ImageSharp/Image/Image{TPixel}.cs
+++ b/src/ImageSharp/Image/Image{TPixel}.cs
@@ -9,6 +9,7 @@ using System.Numerics;
using System.Text;
using System.Threading.Tasks;
using SixLabors.ImageSharp.Formats;
+using SixLabors.ImageSharp.MetaData;
using SixLabors.ImageSharp.PixelFormats;
using SixLabors.ImageSharp.Processing;
using SixLabors.Primitives;
@@ -201,7 +202,7 @@ namespace SixLabors.ImageSharp
}
///
- protected override ImageBase CloneInternal()
+ protected override ImageBase CloneImageBase()
{
return this.Clone();
}
diff --git a/src/ImageSharp/ImageFormats.cs b/src/ImageSharp/ImageFormats.cs
index d677839688..a866e1fa5d 100644
--- a/src/ImageSharp/ImageFormats.cs
+++ b/src/ImageSharp/ImageFormats.cs
@@ -2,6 +2,10 @@
// Licensed under the Apache License, Version 2.0.
using SixLabors.ImageSharp.Formats;
+using SixLabors.ImageSharp.Formats.Bmp;
+using SixLabors.ImageSharp.Formats.Gif;
+using SixLabors.ImageSharp.Formats.Jpeg;
+using SixLabors.ImageSharp.Formats.Png;
namespace SixLabors.ImageSharp
{
diff --git a/src/ImageSharp/MetaData/IMetaData.cs b/src/ImageSharp/MetaData/IFrameMetaData.cs
similarity index 89%
rename from src/ImageSharp/MetaData/IMetaData.cs
rename to src/ImageSharp/MetaData/IFrameMetaData.cs
index 61a906c03d..168b7802cf 100644
--- a/src/ImageSharp/MetaData/IMetaData.cs
+++ b/src/ImageSharp/MetaData/IFrameMetaData.cs
@@ -2,13 +2,14 @@
// Licensed under the Apache License, Version 2.0.
using SixLabors.ImageSharp.Formats;
+using SixLabors.ImageSharp.Formats.Gif;
-namespace SixLabors.ImageSharp
+namespace SixLabors.ImageSharp.MetaData
{
///
/// Encapsulates the metadata of an image frame.
///
- internal interface IMetaData
+ internal interface IFrameMetaData
{
///
/// Gets or sets the frame delay for animated images.
diff --git a/src/ImageSharp/MetaData/ImageFrameMetaData.cs b/src/ImageSharp/MetaData/ImageFrameMetaData.cs
index 71051d11af..e5c2afa87e 100644
--- a/src/ImageSharp/MetaData/ImageFrameMetaData.cs
+++ b/src/ImageSharp/MetaData/ImageFrameMetaData.cs
@@ -2,13 +2,14 @@
// Licensed under the Apache License, Version 2.0.
using SixLabors.ImageSharp.Formats;
+using SixLabors.ImageSharp.Formats.Gif;
-namespace SixLabors.ImageSharp
+namespace SixLabors.ImageSharp.MetaData
{
///
/// Encapsulates the metadata of an image frame.
///
- public sealed class ImageFrameMetaData : IMetaData
+ public sealed class ImageFrameMetaData : IFrameMetaData
{
///
/// Initializes a new instance of the class.
diff --git a/src/ImageSharp/MetaData/ImageMetaData.cs b/src/ImageSharp/MetaData/ImageMetaData.cs
index 5e99f30239..72af569452 100644
--- a/src/ImageSharp/MetaData/ImageMetaData.cs
+++ b/src/ImageSharp/MetaData/ImageMetaData.cs
@@ -3,13 +3,16 @@
using System.Collections.Generic;
using SixLabors.ImageSharp.Formats;
+using SixLabors.ImageSharp.Formats.Gif;
+using SixLabors.ImageSharp.MetaData.Profiles.Exif;
+using SixLabors.ImageSharp.MetaData.Profiles.Icc;
-namespace SixLabors.ImageSharp
+namespace SixLabors.ImageSharp.MetaData
{
///
/// Encapsulates the metadata of an image.
///
- public sealed class ImageMetaData : IMetaData
+ public sealed class ImageMetaData : IFrameMetaData
{
///
/// The default horizontal resolution value (dots per inch) in x direction.
diff --git a/src/ImageSharp/MetaData/ImageProperty.cs b/src/ImageSharp/MetaData/ImageProperty.cs
index 0c575cf260..62ae9d4790 100644
--- a/src/ImageSharp/MetaData/ImageProperty.cs
+++ b/src/ImageSharp/MetaData/ImageProperty.cs
@@ -3,7 +3,7 @@
using System;
-namespace SixLabors.ImageSharp
+namespace SixLabors.ImageSharp.MetaData
{
///
/// Stores meta information about a image, like the name of the author,
diff --git a/src/ImageSharp/MetaData/Profiles/Exif/ExifDataType.cs b/src/ImageSharp/MetaData/Profiles/Exif/ExifDataType.cs
index aa874df79a..8c3c1171c7 100644
--- a/src/ImageSharp/MetaData/Profiles/Exif/ExifDataType.cs
+++ b/src/ImageSharp/MetaData/Profiles/Exif/ExifDataType.cs
@@ -1,7 +1,7 @@
// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
-namespace SixLabors.ImageSharp
+namespace SixLabors.ImageSharp.MetaData.Profiles.Exif
{
///
/// Specifies exif data types.
diff --git a/src/ImageSharp/MetaData/Profiles/Exif/ExifParts.cs b/src/ImageSharp/MetaData/Profiles/Exif/ExifParts.cs
index 3bfa3281a3..b1b42ad433 100644
--- a/src/ImageSharp/MetaData/Profiles/Exif/ExifParts.cs
+++ b/src/ImageSharp/MetaData/Profiles/Exif/ExifParts.cs
@@ -3,7 +3,7 @@
using System;
-namespace SixLabors.ImageSharp
+namespace SixLabors.ImageSharp.MetaData.Profiles.Exif
{
///
/// Specifies which parts will be written when the profile is added to an image.
diff --git a/src/ImageSharp/MetaData/Profiles/Exif/ExifProfile.cs b/src/ImageSharp/MetaData/Profiles/Exif/ExifProfile.cs
index fa18e96a23..f72753cc27 100644
--- a/src/ImageSharp/MetaData/Profiles/Exif/ExifProfile.cs
+++ b/src/ImageSharp/MetaData/Profiles/Exif/ExifProfile.cs
@@ -7,7 +7,7 @@ using System.Collections.ObjectModel;
using System.IO;
using SixLabors.ImageSharp.PixelFormats;
-namespace SixLabors.ImageSharp
+namespace SixLabors.ImageSharp.MetaData.Profiles.Exif
{
///
/// Represents an EXIF profile providing access to the collection of values.
diff --git a/src/ImageSharp/MetaData/Profiles/Exif/ExifReader.cs b/src/ImageSharp/MetaData/Profiles/Exif/ExifReader.cs
index d7d4c8b114..e247527a6e 100644
--- a/src/ImageSharp/MetaData/Profiles/Exif/ExifReader.cs
+++ b/src/ImageSharp/MetaData/Profiles/Exif/ExifReader.cs
@@ -6,7 +6,7 @@ using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
-namespace SixLabors.ImageSharp
+namespace SixLabors.ImageSharp.MetaData.Profiles.Exif
{
///
/// Reads and parses EXIF data from a byte array
diff --git a/src/ImageSharp/MetaData/Profiles/Exif/ExifTag.cs b/src/ImageSharp/MetaData/Profiles/Exif/ExifTag.cs
index c6a9740568..5d2ef1436f 100644
--- a/src/ImageSharp/MetaData/Profiles/Exif/ExifTag.cs
+++ b/src/ImageSharp/MetaData/Profiles/Exif/ExifTag.cs
@@ -1,7 +1,7 @@
// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
-namespace SixLabors.ImageSharp
+namespace SixLabors.ImageSharp.MetaData.Profiles.Exif
{
///
/// All exif tags from the Exif standard 2.2
diff --git a/src/ImageSharp/MetaData/Profiles/Exif/ExifTagDescriptionAttribute.cs b/src/ImageSharp/MetaData/Profiles/Exif/ExifTagDescriptionAttribute.cs
index 6135033254..4021227f57 100644
--- a/src/ImageSharp/MetaData/Profiles/Exif/ExifTagDescriptionAttribute.cs
+++ b/src/ImageSharp/MetaData/Profiles/Exif/ExifTagDescriptionAttribute.cs
@@ -4,7 +4,7 @@
using System;
using System.Reflection;
-namespace SixLabors.ImageSharp
+namespace SixLabors.ImageSharp.MetaData.Profiles.Exif
{
///
/// Class that provides a description for an ExifTag value.
diff --git a/src/ImageSharp/MetaData/Profiles/Exif/ExifValue.cs b/src/ImageSharp/MetaData/Profiles/Exif/ExifValue.cs
index c20aa2cbc7..64508137b4 100644
--- a/src/ImageSharp/MetaData/Profiles/Exif/ExifValue.cs
+++ b/src/ImageSharp/MetaData/Profiles/Exif/ExifValue.cs
@@ -5,7 +5,7 @@ using System;
using System.Globalization;
using System.Text;
-namespace SixLabors.ImageSharp
+namespace SixLabors.ImageSharp.MetaData.Profiles.Exif
{
///
/// Represent the value of the EXIF profile.
diff --git a/src/ImageSharp/MetaData/Profiles/Exif/ExifWriter.cs b/src/ImageSharp/MetaData/Profiles/Exif/ExifWriter.cs
index 2156240224..7f4123225e 100644
--- a/src/ImageSharp/MetaData/Profiles/Exif/ExifWriter.cs
+++ b/src/ImageSharp/MetaData/Profiles/Exif/ExifWriter.cs
@@ -6,7 +6,7 @@ using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Text;
-namespace SixLabors.ImageSharp
+namespace SixLabors.ImageSharp.MetaData.Profiles.Exif
{
///
/// Contains methods for writing EXIF metadata.
diff --git a/src/ImageSharp/Numerics/LongRational.cs b/src/ImageSharp/MetaData/Profiles/Exif/LongRational.cs
similarity index 99%
rename from src/ImageSharp/Numerics/LongRational.cs
rename to src/ImageSharp/MetaData/Profiles/Exif/LongRational.cs
index 48494d6466..f9c16d57d4 100644
--- a/src/ImageSharp/Numerics/LongRational.cs
+++ b/src/ImageSharp/MetaData/Profiles/Exif/LongRational.cs
@@ -5,7 +5,7 @@ using System;
using System.Globalization;
using System.Text;
-namespace SixLabors.ImageSharp
+namespace SixLabors.ImageSharp.MetaData.Profiles.Exif
{
///
/// Represents a number that can be expressed as a fraction
diff --git a/src/ImageSharp/Numerics/Rational.cs b/src/ImageSharp/MetaData/Profiles/Exif/Rational.cs
similarity index 99%
rename from src/ImageSharp/Numerics/Rational.cs
rename to src/ImageSharp/MetaData/Profiles/Exif/Rational.cs
index 03941b90d8..6d62a623f9 100644
--- a/src/ImageSharp/Numerics/Rational.cs
+++ b/src/ImageSharp/MetaData/Profiles/Exif/Rational.cs
@@ -4,7 +4,7 @@
using System;
using System.Globalization;
-namespace SixLabors.ImageSharp
+namespace SixLabors.ImageSharp.MetaData.Profiles.Exif
{
///
/// Represents a number that can be expressed as a fraction.
diff --git a/src/ImageSharp/Numerics/SignedRational.cs b/src/ImageSharp/MetaData/Profiles/Exif/SignedRational.cs
similarity index 99%
rename from src/ImageSharp/Numerics/SignedRational.cs
rename to src/ImageSharp/MetaData/Profiles/Exif/SignedRational.cs
index 8821bd28c6..f2fe359242 100644
--- a/src/ImageSharp/Numerics/SignedRational.cs
+++ b/src/ImageSharp/MetaData/Profiles/Exif/SignedRational.cs
@@ -4,7 +4,7 @@
using System;
using System.Globalization;
-namespace SixLabors.ImageSharp
+namespace SixLabors.ImageSharp.MetaData.Profiles.Exif
{
///
/// Represents a number that can be expressed as a fraction.
diff --git a/src/ImageSharp/MetaData/Profiles/ICC/Curves/IccCurveSegment.cs b/src/ImageSharp/MetaData/Profiles/ICC/Curves/IccCurveSegment.cs
index c1b30bc816..157453f1b1 100644
--- a/src/ImageSharp/MetaData/Profiles/ICC/Curves/IccCurveSegment.cs
+++ b/src/ImageSharp/MetaData/Profiles/ICC/Curves/IccCurveSegment.cs
@@ -3,7 +3,7 @@
using System;
-namespace SixLabors.ImageSharp
+namespace SixLabors.ImageSharp.MetaData.Profiles.Icc
{
///
/// A segment of a curve
diff --git a/src/ImageSharp/MetaData/Profiles/ICC/Curves/IccFormulaCurveElement.cs b/src/ImageSharp/MetaData/Profiles/ICC/Curves/IccFormulaCurveElement.cs
index 44ec136d81..5d931039c8 100644
--- a/src/ImageSharp/MetaData/Profiles/ICC/Curves/IccFormulaCurveElement.cs
+++ b/src/ImageSharp/MetaData/Profiles/ICC/Curves/IccFormulaCurveElement.cs
@@ -3,7 +3,7 @@
using System;
-namespace SixLabors.ImageSharp
+namespace SixLabors.ImageSharp.MetaData.Profiles.Icc
{
///
/// A formula based curve segment
diff --git a/src/ImageSharp/MetaData/Profiles/ICC/Curves/IccOneDimensionalCurve.cs b/src/ImageSharp/MetaData/Profiles/ICC/Curves/IccOneDimensionalCurve.cs
index 377d5d0808..d916486dbf 100644
--- a/src/ImageSharp/MetaData/Profiles/ICC/Curves/IccOneDimensionalCurve.cs
+++ b/src/ImageSharp/MetaData/Profiles/ICC/Curves/IccOneDimensionalCurve.cs
@@ -4,7 +4,7 @@
using System;
using System.Linq;
-namespace SixLabors.ImageSharp
+namespace SixLabors.ImageSharp.MetaData.Profiles.Icc
{
///
/// A one dimensional curve
diff --git a/src/ImageSharp/MetaData/Profiles/ICC/Curves/IccParametricCurve.cs b/src/ImageSharp/MetaData/Profiles/ICC/Curves/IccParametricCurve.cs
index 870c994a8d..46aec49be6 100644
--- a/src/ImageSharp/MetaData/Profiles/ICC/Curves/IccParametricCurve.cs
+++ b/src/ImageSharp/MetaData/Profiles/ICC/Curves/IccParametricCurve.cs
@@ -3,7 +3,7 @@
using System;
-namespace SixLabors.ImageSharp
+namespace SixLabors.ImageSharp.MetaData.Profiles.Icc
{
///
/// A parametric curve
diff --git a/src/ImageSharp/MetaData/Profiles/ICC/Curves/IccResponseCurve.cs b/src/ImageSharp/MetaData/Profiles/ICC/Curves/IccResponseCurve.cs
index 435d014926..ae9cd84b47 100644
--- a/src/ImageSharp/MetaData/Profiles/ICC/Curves/IccResponseCurve.cs
+++ b/src/ImageSharp/MetaData/Profiles/ICC/Curves/IccResponseCurve.cs
@@ -5,7 +5,7 @@ using System;
using System.Linq;
using System.Numerics;
-namespace SixLabors.ImageSharp
+namespace SixLabors.ImageSharp.MetaData.Profiles.Icc
{
///
/// A response curve
diff --git a/src/ImageSharp/MetaData/Profiles/ICC/Curves/IccSampledCurveElement.cs b/src/ImageSharp/MetaData/Profiles/ICC/Curves/IccSampledCurveElement.cs
index de3f348c75..572c4a8f7d 100644
--- a/src/ImageSharp/MetaData/Profiles/ICC/Curves/IccSampledCurveElement.cs
+++ b/src/ImageSharp/MetaData/Profiles/ICC/Curves/IccSampledCurveElement.cs
@@ -4,7 +4,7 @@
using System;
using System.Linq;
-namespace SixLabors.ImageSharp
+namespace SixLabors.ImageSharp.MetaData.Profiles.Icc
{
///
/// A sampled curve segment
diff --git a/src/ImageSharp/MetaData/Profiles/ICC/DataReader/IccDataReader.Curves.cs b/src/ImageSharp/MetaData/Profiles/ICC/DataReader/IccDataReader.Curves.cs
index 6ea81f9cc6..0ea404ad9c 100644
--- a/src/ImageSharp/MetaData/Profiles/ICC/DataReader/IccDataReader.Curves.cs
+++ b/src/ImageSharp/MetaData/Profiles/ICC/DataReader/IccDataReader.Curves.cs
@@ -3,7 +3,7 @@
using System.Numerics;
-namespace SixLabors.ImageSharp
+namespace SixLabors.ImageSharp.MetaData.Profiles.Icc
{
///
/// Provides methods to read ICC data types
diff --git a/src/ImageSharp/MetaData/Profiles/ICC/DataReader/IccDataReader.Lut.cs b/src/ImageSharp/MetaData/Profiles/ICC/DataReader/IccDataReader.Lut.cs
index 0c39cc7bfc..f9d56b0fff 100644
--- a/src/ImageSharp/MetaData/Profiles/ICC/DataReader/IccDataReader.Lut.cs
+++ b/src/ImageSharp/MetaData/Profiles/ICC/DataReader/IccDataReader.Lut.cs
@@ -3,7 +3,7 @@
using System;
-namespace SixLabors.ImageSharp
+namespace SixLabors.ImageSharp.MetaData.Profiles.Icc
{
///
/// Provides methods to read ICC data types
diff --git a/src/ImageSharp/MetaData/Profiles/ICC/DataReader/IccDataReader.Matrix.cs b/src/ImageSharp/MetaData/Profiles/ICC/DataReader/IccDataReader.Matrix.cs
index c209741875..495d73a784 100644
--- a/src/ImageSharp/MetaData/Profiles/ICC/DataReader/IccDataReader.Matrix.cs
+++ b/src/ImageSharp/MetaData/Profiles/ICC/DataReader/IccDataReader.Matrix.cs
@@ -1,7 +1,7 @@
// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
-namespace SixLabors.ImageSharp
+namespace SixLabors.ImageSharp.MetaData.Profiles.Icc
{
///
/// Provides methods to read ICC data types
diff --git a/src/ImageSharp/MetaData/Profiles/ICC/DataReader/IccDataReader.MultiProcessElement.cs b/src/ImageSharp/MetaData/Profiles/ICC/DataReader/IccDataReader.MultiProcessElement.cs
index fd41ec5b67..2b39b1d6c6 100644
--- a/src/ImageSharp/MetaData/Profiles/ICC/DataReader/IccDataReader.MultiProcessElement.cs
+++ b/src/ImageSharp/MetaData/Profiles/ICC/DataReader/IccDataReader.MultiProcessElement.cs
@@ -1,7 +1,7 @@
// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
-namespace SixLabors.ImageSharp
+namespace SixLabors.ImageSharp.MetaData.Profiles.Icc
{
///
/// Provides methods to read ICC data types
diff --git a/src/ImageSharp/MetaData/Profiles/ICC/DataReader/IccDataReader.NonPrimitives.cs b/src/ImageSharp/MetaData/Profiles/ICC/DataReader/IccDataReader.NonPrimitives.cs
index c4642ed25e..8b942498ae 100644
--- a/src/ImageSharp/MetaData/Profiles/ICC/DataReader/IccDataReader.NonPrimitives.cs
+++ b/src/ImageSharp/MetaData/Profiles/ICC/DataReader/IccDataReader.NonPrimitives.cs
@@ -4,7 +4,7 @@
using System;
using System.Numerics;
-namespace SixLabors.ImageSharp
+namespace SixLabors.ImageSharp.MetaData.Profiles.Icc
{
///
/// Provides methods to read ICC data types
diff --git a/src/ImageSharp/MetaData/Profiles/ICC/DataReader/IccDataReader.Primitives.cs b/src/ImageSharp/MetaData/Profiles/ICC/DataReader/IccDataReader.Primitives.cs
index 544a57c7ab..14f7f95703 100644
--- a/src/ImageSharp/MetaData/Profiles/ICC/DataReader/IccDataReader.Primitives.cs
+++ b/src/ImageSharp/MetaData/Profiles/ICC/DataReader/IccDataReader.Primitives.cs
@@ -4,7 +4,7 @@
using System;
using System.Text;
-namespace SixLabors.ImageSharp
+namespace SixLabors.ImageSharp.MetaData.Profiles.Icc
{
///
/// Provides methods to read ICC data types
diff --git a/src/ImageSharp/MetaData/Profiles/ICC/DataReader/IccDataReader.TagDataEntry.cs b/src/ImageSharp/MetaData/Profiles/ICC/DataReader/IccDataReader.TagDataEntry.cs
index c988c9198d..9d92d5341c 100644
--- a/src/ImageSharp/MetaData/Profiles/ICC/DataReader/IccDataReader.TagDataEntry.cs
+++ b/src/ImageSharp/MetaData/Profiles/ICC/DataReader/IccDataReader.TagDataEntry.cs
@@ -5,7 +5,7 @@ using System;
using System.Globalization;
using System.Numerics;
-namespace SixLabors.ImageSharp
+namespace SixLabors.ImageSharp.MetaData.Profiles.Icc
{
///
/// Provides methods to read ICC data types
diff --git a/src/ImageSharp/MetaData/Profiles/ICC/DataReader/IccDataReader.cs b/src/ImageSharp/MetaData/Profiles/ICC/DataReader/IccDataReader.cs
index 8e269a474a..1fecd761a6 100644
--- a/src/ImageSharp/MetaData/Profiles/ICC/DataReader/IccDataReader.cs
+++ b/src/ImageSharp/MetaData/Profiles/ICC/DataReader/IccDataReader.cs
@@ -5,7 +5,7 @@ using System;
using System.Text;
using SixLabors.ImageSharp.IO;
-namespace SixLabors.ImageSharp
+namespace SixLabors.ImageSharp.MetaData.Profiles.Icc
{
///
/// Provides methods to read ICC data types
diff --git a/src/ImageSharp/MetaData/Profiles/ICC/DataWriter/IccDataWriter.Curves.cs b/src/ImageSharp/MetaData/Profiles/ICC/DataWriter/IccDataWriter.Curves.cs
index 6cbb7148af..d5f5d5a9b6 100644
--- a/src/ImageSharp/MetaData/Profiles/ICC/DataWriter/IccDataWriter.Curves.cs
+++ b/src/ImageSharp/MetaData/Profiles/ICC/DataWriter/IccDataWriter.Curves.cs
@@ -3,7 +3,7 @@
using System.Numerics;
-namespace SixLabors.ImageSharp
+namespace SixLabors.ImageSharp.MetaData.Profiles.Icc
{
///
/// Provides methods to write ICC data types
diff --git a/src/ImageSharp/MetaData/Profiles/ICC/DataWriter/IccDataWriter.Lut.cs b/src/ImageSharp/MetaData/Profiles/ICC/DataWriter/IccDataWriter.Lut.cs
index 0cfae36fc2..38a3dd457d 100644
--- a/src/ImageSharp/MetaData/Profiles/ICC/DataWriter/IccDataWriter.Lut.cs
+++ b/src/ImageSharp/MetaData/Profiles/ICC/DataWriter/IccDataWriter.Lut.cs
@@ -1,7 +1,7 @@
// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
-namespace SixLabors.ImageSharp
+namespace SixLabors.ImageSharp.MetaData.Profiles.Icc
{
///
/// Provides methods to write ICC data types
diff --git a/src/ImageSharp/MetaData/Profiles/ICC/DataWriter/IccDataWriter.Matrix.cs b/src/ImageSharp/MetaData/Profiles/ICC/DataWriter/IccDataWriter.Matrix.cs
index 3f873d3b0f..0b7064cf93 100644
--- a/src/ImageSharp/MetaData/Profiles/ICC/DataWriter/IccDataWriter.Matrix.cs
+++ b/src/ImageSharp/MetaData/Profiles/ICC/DataWriter/IccDataWriter.Matrix.cs
@@ -4,7 +4,7 @@
using System.Numerics;
using SixLabors.ImageSharp.Memory;
-namespace SixLabors.ImageSharp
+namespace SixLabors.ImageSharp.MetaData.Profiles.Icc
{
///
/// Provides methods to write ICC data types
diff --git a/src/ImageSharp/MetaData/Profiles/ICC/DataWriter/IccDataWriter.MultiProcessElement.cs b/src/ImageSharp/MetaData/Profiles/ICC/DataWriter/IccDataWriter.MultiProcessElement.cs
index 2522aee805..48c6734aec 100644
--- a/src/ImageSharp/MetaData/Profiles/ICC/DataWriter/IccDataWriter.MultiProcessElement.cs
+++ b/src/ImageSharp/MetaData/Profiles/ICC/DataWriter/IccDataWriter.MultiProcessElement.cs
@@ -1,7 +1,7 @@
// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
-namespace SixLabors.ImageSharp
+namespace SixLabors.ImageSharp.MetaData.Profiles.Icc
{
///
/// Provides methods to write ICC data types
diff --git a/src/ImageSharp/MetaData/Profiles/ICC/DataWriter/IccDataWriter.NonPrimitives.cs b/src/ImageSharp/MetaData/Profiles/ICC/DataWriter/IccDataWriter.NonPrimitives.cs
index 9f8d8d0579..791a94a339 100644
--- a/src/ImageSharp/MetaData/Profiles/ICC/DataWriter/IccDataWriter.NonPrimitives.cs
+++ b/src/ImageSharp/MetaData/Profiles/ICC/DataWriter/IccDataWriter.NonPrimitives.cs
@@ -4,7 +4,7 @@
using System;
using System.Numerics;
-namespace SixLabors.ImageSharp
+namespace SixLabors.ImageSharp.MetaData.Profiles.Icc
{
///
/// Provides methods to write ICC data types
diff --git a/src/ImageSharp/MetaData/Profiles/ICC/DataWriter/IccDataWriter.Primitives.cs b/src/ImageSharp/MetaData/Profiles/ICC/DataWriter/IccDataWriter.Primitives.cs
index eb5f7eddb3..bf39a08491 100644
--- a/src/ImageSharp/MetaData/Profiles/ICC/DataWriter/IccDataWriter.Primitives.cs
+++ b/src/ImageSharp/MetaData/Profiles/ICC/DataWriter/IccDataWriter.Primitives.cs
@@ -4,7 +4,7 @@
using System;
using System.Text;
-namespace SixLabors.ImageSharp
+namespace SixLabors.ImageSharp.MetaData.Profiles.Icc
{
///
/// Provides methods to write ICC data types
diff --git a/src/ImageSharp/MetaData/Profiles/ICC/DataWriter/IccDataWriter.TagDataEntry.cs b/src/ImageSharp/MetaData/Profiles/ICC/DataWriter/IccDataWriter.TagDataEntry.cs
index 8c0640cbdd..9ee4f00046 100644
--- a/src/ImageSharp/MetaData/Profiles/ICC/DataWriter/IccDataWriter.TagDataEntry.cs
+++ b/src/ImageSharp/MetaData/Profiles/ICC/DataWriter/IccDataWriter.TagDataEntry.cs
@@ -3,7 +3,7 @@
using System.Linq;
-namespace SixLabors.ImageSharp
+namespace SixLabors.ImageSharp.MetaData.Profiles.Icc
{
///
/// Provides methods to write ICC data types
diff --git a/src/ImageSharp/MetaData/Profiles/ICC/DataWriter/IccDataWriter.cs b/src/ImageSharp/MetaData/Profiles/ICC/DataWriter/IccDataWriter.cs
index 6a0ddf6399..cfcc66c8e4 100644
--- a/src/ImageSharp/MetaData/Profiles/ICC/DataWriter/IccDataWriter.cs
+++ b/src/ImageSharp/MetaData/Profiles/ICC/DataWriter/IccDataWriter.cs
@@ -5,7 +5,7 @@ using System;
using System.IO;
using System.Text;
-namespace SixLabors.ImageSharp
+namespace SixLabors.ImageSharp.MetaData.Profiles.Icc
{
///
/// Provides methods to write ICC data types
diff --git a/src/ImageSharp/MetaData/Profiles/ICC/Enums/IccClutDataType.cs b/src/ImageSharp/MetaData/Profiles/ICC/Enums/IccClutDataType.cs
index 021051b256..fe0c9b8b59 100644
--- a/src/ImageSharp/MetaData/Profiles/ICC/Enums/IccClutDataType.cs
+++ b/src/ImageSharp/MetaData/Profiles/ICC/Enums/IccClutDataType.cs
@@ -1,7 +1,7 @@
// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
-namespace SixLabors.ImageSharp
+namespace SixLabors.ImageSharp.MetaData.Profiles.Icc
{
///
/// Color lookup table data type
diff --git a/src/ImageSharp/MetaData/Profiles/ICC/Enums/IccColorSpaceType.cs b/src/ImageSharp/MetaData/Profiles/ICC/Enums/IccColorSpaceType.cs
index 77967ad663..0913cda418 100644
--- a/src/ImageSharp/MetaData/Profiles/ICC/Enums/IccColorSpaceType.cs
+++ b/src/ImageSharp/MetaData/Profiles/ICC/Enums/IccColorSpaceType.cs
@@ -1,7 +1,7 @@
// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
-namespace SixLabors.ImageSharp
+namespace SixLabors.ImageSharp.MetaData.Profiles.Icc
{
///
/// Color Space Type
diff --git a/src/ImageSharp/MetaData/Profiles/ICC/Enums/IccColorantEncoding.cs b/src/ImageSharp/MetaData/Profiles/ICC/Enums/IccColorantEncoding.cs
index 22c29d31d1..bec71e0dbc 100644
--- a/src/ImageSharp/MetaData/Profiles/ICC/Enums/IccColorantEncoding.cs
+++ b/src/ImageSharp/MetaData/Profiles/ICC/Enums/IccColorantEncoding.cs
@@ -1,7 +1,7 @@
// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
-namespace SixLabors.ImageSharp
+namespace SixLabors.ImageSharp.MetaData.Profiles.Icc
{
///
/// Colorant Encoding
diff --git a/src/ImageSharp/MetaData/Profiles/ICC/Enums/IccCurveMeasurementEncodings.cs b/src/ImageSharp/MetaData/Profiles/ICC/Enums/IccCurveMeasurementEncodings.cs
index 6d5e1b6f74..cfd2671e94 100644
--- a/src/ImageSharp/MetaData/Profiles/ICC/Enums/IccCurveMeasurementEncodings.cs
+++ b/src/ImageSharp/MetaData/Profiles/ICC/Enums/IccCurveMeasurementEncodings.cs
@@ -1,7 +1,7 @@
// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
-namespace SixLabors.ImageSharp
+namespace SixLabors.ImageSharp.MetaData.Profiles.Icc
{
///
/// Curve Measurement Encodings
diff --git a/src/ImageSharp/MetaData/Profiles/ICC/Enums/IccCurveSegmentSignature.cs b/src/ImageSharp/MetaData/Profiles/ICC/Enums/IccCurveSegmentSignature.cs
index d1c0f28434..e9b8cc26b8 100644
--- a/src/ImageSharp/MetaData/Profiles/ICC/Enums/IccCurveSegmentSignature.cs
+++ b/src/ImageSharp/MetaData/Profiles/ICC/Enums/IccCurveSegmentSignature.cs
@@ -1,7 +1,7 @@
// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
-namespace SixLabors.ImageSharp
+namespace SixLabors.ImageSharp.MetaData.Profiles.Icc
{
///
/// Curve Segment Signature
diff --git a/src/ImageSharp/MetaData/Profiles/ICC/Enums/IccDataType.cs b/src/ImageSharp/MetaData/Profiles/ICC/Enums/IccDataType.cs
index 4fcca3f249..b13edb53f4 100644
--- a/src/ImageSharp/MetaData/Profiles/ICC/Enums/IccDataType.cs
+++ b/src/ImageSharp/MetaData/Profiles/ICC/Enums/IccDataType.cs
@@ -1,7 +1,7 @@
// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
-namespace SixLabors.ImageSharp
+namespace SixLabors.ImageSharp.MetaData.Profiles.Icc
{
///
/// Enumerates the basic data types as defined in ICC.1:2010 version 4.3.0.0
diff --git a/src/ImageSharp/MetaData/Profiles/ICC/Enums/IccDeviceAttribute.cs b/src/ImageSharp/MetaData/Profiles/ICC/Enums/IccDeviceAttribute.cs
index 131434cfdc..88cca866dc 100644
--- a/src/ImageSharp/MetaData/Profiles/ICC/Enums/IccDeviceAttribute.cs
+++ b/src/ImageSharp/MetaData/Profiles/ICC/Enums/IccDeviceAttribute.cs
@@ -3,7 +3,7 @@
using System;
-namespace SixLabors.ImageSharp
+namespace SixLabors.ImageSharp.MetaData.Profiles.Icc
{
///
/// Device attributes. Can be combined with a logical OR
diff --git a/src/ImageSharp/MetaData/Profiles/ICC/Enums/IccFormulaCurveType.cs b/src/ImageSharp/MetaData/Profiles/ICC/Enums/IccFormulaCurveType.cs
index 8810bbbb04..2a375b0d1c 100644
--- a/src/ImageSharp/MetaData/Profiles/ICC/Enums/IccFormulaCurveType.cs
+++ b/src/ImageSharp/MetaData/Profiles/ICC/Enums/IccFormulaCurveType.cs
@@ -1,7 +1,7 @@
// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
-namespace SixLabors.ImageSharp
+namespace SixLabors.ImageSharp.MetaData.Profiles.Icc
{
///
/// Formula curve segment type
diff --git a/src/ImageSharp/MetaData/Profiles/ICC/Enums/IccMeasurementGeometry.cs b/src/ImageSharp/MetaData/Profiles/ICC/Enums/IccMeasurementGeometry.cs
index dc8db74629..fe6575c41b 100644
--- a/src/ImageSharp/MetaData/Profiles/ICC/Enums/IccMeasurementGeometry.cs
+++ b/src/ImageSharp/MetaData/Profiles/ICC/Enums/IccMeasurementGeometry.cs
@@ -1,7 +1,7 @@
// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
-namespace SixLabors.ImageSharp
+namespace SixLabors.ImageSharp.MetaData.Profiles.Icc
{
///
/// Measurement Geometry
diff --git a/src/ImageSharp/MetaData/Profiles/ICC/Enums/IccMultiProcessElementSignature.cs b/src/ImageSharp/MetaData/Profiles/ICC/Enums/IccMultiProcessElementSignature.cs
index 80c74952ab..fe5d309228 100644
--- a/src/ImageSharp/MetaData/Profiles/ICC/Enums/IccMultiProcessElementSignature.cs
+++ b/src/ImageSharp/MetaData/Profiles/ICC/Enums/IccMultiProcessElementSignature.cs
@@ -1,7 +1,7 @@
// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
-namespace SixLabors.ImageSharp
+namespace SixLabors.ImageSharp.MetaData.Profiles.Icc
{
///
/// Multi process element signature
diff --git a/src/ImageSharp/MetaData/Profiles/ICC/Enums/IccParametricCurveType.cs b/src/ImageSharp/MetaData/Profiles/ICC/Enums/IccParametricCurveType.cs
index 563a40c901..374b4ad93b 100644
--- a/src/ImageSharp/MetaData/Profiles/ICC/Enums/IccParametricCurveType.cs
+++ b/src/ImageSharp/MetaData/Profiles/ICC/Enums/IccParametricCurveType.cs
@@ -1,7 +1,7 @@
// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
-namespace SixLabors.ImageSharp
+namespace SixLabors.ImageSharp.MetaData.Profiles.Icc
{
///
/// Formula curve segment type
diff --git a/src/ImageSharp/MetaData/Profiles/ICC/Enums/IccPrimaryPlatformType.cs b/src/ImageSharp/MetaData/Profiles/ICC/Enums/IccPrimaryPlatformType.cs
index ee6f719109..1563078f72 100644
--- a/src/ImageSharp/MetaData/Profiles/ICC/Enums/IccPrimaryPlatformType.cs
+++ b/src/ImageSharp/MetaData/Profiles/ICC/Enums/IccPrimaryPlatformType.cs
@@ -1,7 +1,7 @@
// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
-namespace SixLabors.ImageSharp
+namespace SixLabors.ImageSharp.MetaData.Profiles.Icc
{
///
/// Enumerates the primary platform/operating system framework for which the profile was created
diff --git a/src/ImageSharp/MetaData/Profiles/ICC/Enums/IccProfileClass.cs b/src/ImageSharp/MetaData/Profiles/ICC/Enums/IccProfileClass.cs
index dbb6d61ed6..71c27ca611 100644
--- a/src/ImageSharp/MetaData/Profiles/ICC/Enums/IccProfileClass.cs
+++ b/src/ImageSharp/MetaData/Profiles/ICC/Enums/IccProfileClass.cs
@@ -1,7 +1,7 @@
// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
-namespace SixLabors.ImageSharp
+namespace SixLabors.ImageSharp.MetaData.Profiles.Icc
{
///
/// Profile Class Name
diff --git a/src/ImageSharp/MetaData/Profiles/ICC/Enums/IccProfileFlag.cs b/src/ImageSharp/MetaData/Profiles/ICC/Enums/IccProfileFlag.cs
index f149415d81..3758be34b7 100644
--- a/src/ImageSharp/MetaData/Profiles/ICC/Enums/IccProfileFlag.cs
+++ b/src/ImageSharp/MetaData/Profiles/ICC/Enums/IccProfileFlag.cs
@@ -3,7 +3,7 @@
using System;
-namespace SixLabors.ImageSharp
+namespace SixLabors.ImageSharp.MetaData.Profiles.Icc
{
///
/// Profile flags. Can be combined with a logical OR.
diff --git a/src/ImageSharp/MetaData/Profiles/ICC/Enums/IccProfileTag.cs b/src/ImageSharp/MetaData/Profiles/ICC/Enums/IccProfileTag.cs
index 7c71fe9a54..82b2969003 100644
--- a/src/ImageSharp/MetaData/Profiles/ICC/Enums/IccProfileTag.cs
+++ b/src/ImageSharp/MetaData/Profiles/ICC/Enums/IccProfileTag.cs
@@ -2,7 +2,7 @@
// Licensed under the Apache License, Version 2.0.
// ReSharper disable InconsistentNaming
-namespace SixLabors.ImageSharp
+namespace SixLabors.ImageSharp.MetaData.Profiles.Icc
{
///
/// Enumerates the ICC Profile Tags as defined in ICC.1:2010 version 4.3.0.0
diff --git a/src/ImageSharp/MetaData/Profiles/ICC/Enums/IccRenderingIntent.cs b/src/ImageSharp/MetaData/Profiles/ICC/Enums/IccRenderingIntent.cs
index cfcb8312eb..e0504b24cb 100644
--- a/src/ImageSharp/MetaData/Profiles/ICC/Enums/IccRenderingIntent.cs
+++ b/src/ImageSharp/MetaData/Profiles/ICC/Enums/IccRenderingIntent.cs
@@ -1,7 +1,7 @@
// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
-namespace SixLabors.ImageSharp
+namespace SixLabors.ImageSharp.MetaData.Profiles.Icc
{
///
/// Rendering intent
diff --git a/src/ImageSharp/MetaData/Profiles/ICC/Enums/IccScreeningFlag.cs b/src/ImageSharp/MetaData/Profiles/ICC/Enums/IccScreeningFlag.cs
index 422b752023..839ab8c6b1 100644
--- a/src/ImageSharp/MetaData/Profiles/ICC/Enums/IccScreeningFlag.cs
+++ b/src/ImageSharp/MetaData/Profiles/ICC/Enums/IccScreeningFlag.cs
@@ -3,7 +3,7 @@
using System;
-namespace SixLabors.ImageSharp
+namespace SixLabors.ImageSharp.MetaData.Profiles.Icc
{
///
/// Screening flags. Can be combined with a logical OR.
diff --git a/src/ImageSharp/MetaData/Profiles/ICC/Enums/IccScreeningSpotType.cs b/src/ImageSharp/MetaData/Profiles/ICC/Enums/IccScreeningSpotType.cs
index 02138be3b3..f1d73c6268 100644
--- a/src/ImageSharp/MetaData/Profiles/ICC/Enums/IccScreeningSpotType.cs
+++ b/src/ImageSharp/MetaData/Profiles/ICC/Enums/IccScreeningSpotType.cs
@@ -1,7 +1,7 @@
// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
-namespace SixLabors.ImageSharp
+namespace SixLabors.ImageSharp.MetaData.Profiles.Icc
{
///
/// Enumerates the screening spot types
diff --git a/src/ImageSharp/MetaData/Profiles/ICC/Enums/IccSignatureName.cs b/src/ImageSharp/MetaData/Profiles/ICC/Enums/IccSignatureName.cs
index b929afd9a9..4773ab6c2a 100644
--- a/src/ImageSharp/MetaData/Profiles/ICC/Enums/IccSignatureName.cs
+++ b/src/ImageSharp/MetaData/Profiles/ICC/Enums/IccSignatureName.cs
@@ -1,7 +1,7 @@
// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
-namespace SixLabors.ImageSharp
+namespace SixLabors.ImageSharp.MetaData.Profiles.Icc
{
///
/// Signature Name
diff --git a/src/ImageSharp/MetaData/Profiles/ICC/Enums/IccStandardIlluminant.cs b/src/ImageSharp/MetaData/Profiles/ICC/Enums/IccStandardIlluminant.cs
index c4482de1f1..fe0c406576 100644
--- a/src/ImageSharp/MetaData/Profiles/ICC/Enums/IccStandardIlluminant.cs
+++ b/src/ImageSharp/MetaData/Profiles/ICC/Enums/IccStandardIlluminant.cs
@@ -1,7 +1,7 @@
// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
-namespace SixLabors.ImageSharp
+namespace SixLabors.ImageSharp.MetaData.Profiles.Icc
{
///
/// Standard Illuminant
diff --git a/src/ImageSharp/MetaData/Profiles/ICC/Enums/IccStandardObserver.cs b/src/ImageSharp/MetaData/Profiles/ICC/Enums/IccStandardObserver.cs
index cfbec77689..a393c258b2 100644
--- a/src/ImageSharp/MetaData/Profiles/ICC/Enums/IccStandardObserver.cs
+++ b/src/ImageSharp/MetaData/Profiles/ICC/Enums/IccStandardObserver.cs
@@ -1,7 +1,7 @@
// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
-namespace SixLabors.ImageSharp
+namespace SixLabors.ImageSharp.MetaData.Profiles.Icc
{
///
/// Standard Observer
diff --git a/src/ImageSharp/MetaData/Profiles/ICC/Enums/IccTypeSignature.cs b/src/ImageSharp/MetaData/Profiles/ICC/Enums/IccTypeSignature.cs
index 2249341af2..1493ecc6bb 100644
--- a/src/ImageSharp/MetaData/Profiles/ICC/Enums/IccTypeSignature.cs
+++ b/src/ImageSharp/MetaData/Profiles/ICC/Enums/IccTypeSignature.cs
@@ -1,7 +1,7 @@
// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
-namespace SixLabors.ImageSharp
+namespace SixLabors.ImageSharp.MetaData.Profiles.Icc
{
///
/// Type Signature
diff --git a/src/ImageSharp/MetaData/Profiles/ICC/Exceptions/InvalidIccProfileException.cs b/src/ImageSharp/MetaData/Profiles/ICC/Exceptions/InvalidIccProfileException.cs
index 13e20fd9d5..d867edbebb 100644
--- a/src/ImageSharp/MetaData/Profiles/ICC/Exceptions/InvalidIccProfileException.cs
+++ b/src/ImageSharp/MetaData/Profiles/ICC/Exceptions/InvalidIccProfileException.cs
@@ -3,7 +3,7 @@
using System;
-namespace SixLabors.ImageSharp
+namespace SixLabors.ImageSharp.MetaData.Profiles.Icc
{
///
/// Represents an error that happened while reading or writing a corrupt/invalid ICC profile
diff --git a/src/ImageSharp/MetaData/Profiles/ICC/IccProfile.cs b/src/ImageSharp/MetaData/Profiles/ICC/IccProfile.cs
index 7f8ba391d8..df85b2ab8e 100644
--- a/src/ImageSharp/MetaData/Profiles/ICC/IccProfile.cs
+++ b/src/ImageSharp/MetaData/Profiles/ICC/IccProfile.cs
@@ -8,7 +8,7 @@ using System.Collections.Generic;
using System.Security.Cryptography;
#endif
-namespace SixLabors.ImageSharp
+namespace SixLabors.ImageSharp.MetaData.Profiles.Icc
{
///
/// Represents an ICC profile
diff --git a/src/ImageSharp/MetaData/Profiles/ICC/IccProfileHeader.cs b/src/ImageSharp/MetaData/Profiles/ICC/IccProfileHeader.cs
index e08914a973..f91572cfe6 100644
--- a/src/ImageSharp/MetaData/Profiles/ICC/IccProfileHeader.cs
+++ b/src/ImageSharp/MetaData/Profiles/ICC/IccProfileHeader.cs
@@ -4,7 +4,7 @@
using System;
using System.Numerics;
-namespace SixLabors.ImageSharp
+namespace SixLabors.ImageSharp.MetaData.Profiles.Icc
{
///
/// Contains all values of an ICC profile header
diff --git a/src/ImageSharp/MetaData/Profiles/ICC/IccReader.cs b/src/ImageSharp/MetaData/Profiles/ICC/IccReader.cs
index a01a0beac3..ea84113fd9 100644
--- a/src/ImageSharp/MetaData/Profiles/ICC/IccReader.cs
+++ b/src/ImageSharp/MetaData/Profiles/ICC/IccReader.cs
@@ -3,7 +3,7 @@
using System.Collections.Generic;
-namespace SixLabors.ImageSharp
+namespace SixLabors.ImageSharp.MetaData.Profiles.Icc
{
///
/// Reads and parses ICC data from a byte array
diff --git a/src/ImageSharp/MetaData/Profiles/ICC/IccTagDataEntry.cs b/src/ImageSharp/MetaData/Profiles/ICC/IccTagDataEntry.cs
index 5bada6e772..4789a69fe7 100644
--- a/src/ImageSharp/MetaData/Profiles/ICC/IccTagDataEntry.cs
+++ b/src/ImageSharp/MetaData/Profiles/ICC/IccTagDataEntry.cs
@@ -3,7 +3,7 @@
using System;
-namespace SixLabors.ImageSharp
+namespace SixLabors.ImageSharp.MetaData.Profiles.Icc
{
///
/// The data of an ICC tag entry
diff --git a/src/ImageSharp/MetaData/Profiles/ICC/IccWriter.cs b/src/ImageSharp/MetaData/Profiles/ICC/IccWriter.cs
index c7f39aff4d..d7221e8cf8 100644
--- a/src/ImageSharp/MetaData/Profiles/ICC/IccWriter.cs
+++ b/src/ImageSharp/MetaData/Profiles/ICC/IccWriter.cs
@@ -5,7 +5,7 @@ using System;
using System.Collections.Generic;
using System.Linq;
-namespace SixLabors.ImageSharp
+namespace SixLabors.ImageSharp.MetaData.Profiles.Icc
{
///
/// Contains methods for writing ICC profiles.
diff --git a/src/ImageSharp/MetaData/Profiles/ICC/MultiProcessElements/IccBAcsProcessElement.cs b/src/ImageSharp/MetaData/Profiles/ICC/MultiProcessElements/IccBAcsProcessElement.cs
index 566a9cff4e..09931a1f91 100644
--- a/src/ImageSharp/MetaData/Profiles/ICC/MultiProcessElements/IccBAcsProcessElement.cs
+++ b/src/ImageSharp/MetaData/Profiles/ICC/MultiProcessElements/IccBAcsProcessElement.cs
@@ -3,7 +3,7 @@
using System;
-namespace SixLabors.ImageSharp
+namespace SixLabors.ImageSharp.MetaData.Profiles.Icc
{
///
/// A placeholder (might be used for future ICC versions)
diff --git a/src/ImageSharp/MetaData/Profiles/ICC/MultiProcessElements/IccClutProcessElement.cs b/src/ImageSharp/MetaData/Profiles/ICC/MultiProcessElements/IccClutProcessElement.cs
index 2c93796630..384ae850f3 100644
--- a/src/ImageSharp/MetaData/Profiles/ICC/MultiProcessElements/IccClutProcessElement.cs
+++ b/src/ImageSharp/MetaData/Profiles/ICC/MultiProcessElements/IccClutProcessElement.cs
@@ -3,7 +3,7 @@
using System;
-namespace SixLabors.ImageSharp
+namespace SixLabors.ImageSharp.MetaData.Profiles.Icc
{
///
/// A CLUT (color lookup table) element to process data
diff --git a/src/ImageSharp/MetaData/Profiles/ICC/MultiProcessElements/IccCurveSetProcessElement.cs b/src/ImageSharp/MetaData/Profiles/ICC/MultiProcessElements/IccCurveSetProcessElement.cs
index e081c084e8..d04869548b 100644
--- a/src/ImageSharp/MetaData/Profiles/ICC/MultiProcessElements/IccCurveSetProcessElement.cs
+++ b/src/ImageSharp/MetaData/Profiles/ICC/MultiProcessElements/IccCurveSetProcessElement.cs
@@ -4,7 +4,7 @@
using System;
using System.Linq;
-namespace SixLabors.ImageSharp
+namespace SixLabors.ImageSharp.MetaData.Profiles.Icc
{
///
/// A set of curves to process data
diff --git a/src/ImageSharp/MetaData/Profiles/ICC/MultiProcessElements/IccEAcsProcessElement.cs b/src/ImageSharp/MetaData/Profiles/ICC/MultiProcessElements/IccEAcsProcessElement.cs
index c4a49eeb3f..7e0e1eda82 100644
--- a/src/ImageSharp/MetaData/Profiles/ICC/MultiProcessElements/IccEAcsProcessElement.cs
+++ b/src/ImageSharp/MetaData/Profiles/ICC/MultiProcessElements/IccEAcsProcessElement.cs
@@ -3,7 +3,7 @@
using System;
-namespace SixLabors.ImageSharp
+namespace SixLabors.ImageSharp.MetaData.Profiles.Icc
{
///
/// A placeholder (might be used for future ICC versions)
diff --git a/src/ImageSharp/MetaData/Profiles/ICC/MultiProcessElements/IccMatrixProcessElement.cs b/src/ImageSharp/MetaData/Profiles/ICC/MultiProcessElements/IccMatrixProcessElement.cs
index afe41c624c..642f766d56 100644
--- a/src/ImageSharp/MetaData/Profiles/ICC/MultiProcessElements/IccMatrixProcessElement.cs
+++ b/src/ImageSharp/MetaData/Profiles/ICC/MultiProcessElements/IccMatrixProcessElement.cs
@@ -5,7 +5,7 @@ using System;
using System.Linq;
using SixLabors.ImageSharp.Memory;
-namespace SixLabors.ImageSharp
+namespace SixLabors.ImageSharp.MetaData.Profiles.Icc
{
///
/// A matrix element to process data
diff --git a/src/ImageSharp/MetaData/Profiles/ICC/MultiProcessElements/IccMultiProcessElement.cs b/src/ImageSharp/MetaData/Profiles/ICC/MultiProcessElements/IccMultiProcessElement.cs
index ebac2912b4..59acd0eb7f 100644
--- a/src/ImageSharp/MetaData/Profiles/ICC/MultiProcessElements/IccMultiProcessElement.cs
+++ b/src/ImageSharp/MetaData/Profiles/ICC/MultiProcessElements/IccMultiProcessElement.cs
@@ -3,7 +3,7 @@
using System;
-namespace SixLabors.ImageSharp
+namespace SixLabors.ImageSharp.MetaData.Profiles.Icc
{
///
/// An element to process data
diff --git a/src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccChromaticityTagDataEntry.cs b/src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccChromaticityTagDataEntry.cs
index a7a70c11bd..6d838558a2 100644
--- a/src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccChromaticityTagDataEntry.cs
+++ b/src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccChromaticityTagDataEntry.cs
@@ -4,7 +4,7 @@
using System;
using System.Linq;
-namespace SixLabors.ImageSharp
+namespace SixLabors.ImageSharp.MetaData.Profiles.Icc
{
///
/// The chromaticity tag type provides basic chromaticity data
diff --git a/src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccColorantOrderTagDataEntry.cs b/src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccColorantOrderTagDataEntry.cs
index 654af027eb..56af95a169 100644
--- a/src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccColorantOrderTagDataEntry.cs
+++ b/src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccColorantOrderTagDataEntry.cs
@@ -4,7 +4,7 @@
using System;
using System.Linq;
-namespace SixLabors.ImageSharp
+namespace SixLabors.ImageSharp.MetaData.Profiles.Icc
{
///
/// This tag specifies the laydown order in which colorants
diff --git a/src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccColorantTableTagDataEntry.cs b/src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccColorantTableTagDataEntry.cs
index 5adc7ca283..b04ee10d00 100644
--- a/src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccColorantTableTagDataEntry.cs
+++ b/src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccColorantTableTagDataEntry.cs
@@ -4,7 +4,7 @@
using System;
using System.Linq;
-namespace SixLabors.ImageSharp
+namespace SixLabors.ImageSharp.MetaData.Profiles.Icc
{
///
/// The purpose of this tag is to identify the colorants used in
diff --git a/src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccCrdInfoTagDataEntry.cs b/src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccCrdInfoTagDataEntry.cs
index 431ffa887c..1e516ce7f0 100644
--- a/src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccCrdInfoTagDataEntry.cs
+++ b/src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccCrdInfoTagDataEntry.cs
@@ -3,7 +3,7 @@
using System;
-namespace SixLabors.ImageSharp
+namespace SixLabors.ImageSharp.MetaData.Profiles.Icc
{
///
/// This type contains the PostScript product name to which this profile
diff --git a/src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccCurveTagDataEntry.cs b/src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccCurveTagDataEntry.cs
index 0ab80e5065..7f753ff7d5 100644
--- a/src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccCurveTagDataEntry.cs
+++ b/src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccCurveTagDataEntry.cs
@@ -4,7 +4,7 @@
using System;
using System.Linq;
-namespace SixLabors.ImageSharp
+namespace SixLabors.ImageSharp.MetaData.Profiles.Icc
{
///
/// The type contains a one-dimensional table of double values.
diff --git a/src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccDataTagDataEntry.cs b/src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccDataTagDataEntry.cs
index f39330d6cd..3b17e29429 100644
--- a/src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccDataTagDataEntry.cs
+++ b/src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccDataTagDataEntry.cs
@@ -5,7 +5,7 @@ using System;
using System.Linq;
using System.Text;
-namespace SixLabors.ImageSharp
+namespace SixLabors.ImageSharp.MetaData.Profiles.Icc
{
///
/// The dataType is a simple data structure that contains
diff --git a/src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccDateTimeTagDataEntry.cs b/src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccDateTimeTagDataEntry.cs
index 4dc935b9b5..879c208c1e 100644
--- a/src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccDateTimeTagDataEntry.cs
+++ b/src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccDateTimeTagDataEntry.cs
@@ -3,7 +3,7 @@
using System;
-namespace SixLabors.ImageSharp
+namespace SixLabors.ImageSharp.MetaData.Profiles.Icc
{
///
/// This type is a representation of the time and date.
diff --git a/src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccFix16ArrayTagDataEntry.cs b/src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccFix16ArrayTagDataEntry.cs
index d8d67465bb..23580fac6c 100644
--- a/src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccFix16ArrayTagDataEntry.cs
+++ b/src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccFix16ArrayTagDataEntry.cs
@@ -4,7 +4,7 @@
using System;
using System.Linq;
-namespace SixLabors.ImageSharp
+namespace SixLabors.ImageSharp.MetaData.Profiles.Icc
{
///
/// This type represents an array of doubles (from 32bit fixed point values).
diff --git a/src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccLut16TagDataEntry.cs b/src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccLut16TagDataEntry.cs
index fec50e3e3a..13e1463309 100644
--- a/src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccLut16TagDataEntry.cs
+++ b/src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccLut16TagDataEntry.cs
@@ -5,7 +5,7 @@ using System;
using System.Linq;
using System.Numerics;
-namespace SixLabors.ImageSharp
+namespace SixLabors.ImageSharp.MetaData.Profiles.Icc
{
///
/// This structure represents a color transform using tables
diff --git a/src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccLut8TagDataEntry.cs b/src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccLut8TagDataEntry.cs
index 89e5e38949..fd6d028eaa 100644
--- a/src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccLut8TagDataEntry.cs
+++ b/src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccLut8TagDataEntry.cs
@@ -5,7 +5,7 @@ using System;
using System.Linq;
using System.Numerics;
-namespace SixLabors.ImageSharp
+namespace SixLabors.ImageSharp.MetaData.Profiles.Icc
{
///
/// This structure represents a color transform using tables
diff --git a/src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccLutAToBTagDataEntry.cs b/src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccLutAToBTagDataEntry.cs
index 17720dd5dd..faf9a45506 100644
--- a/src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccLutAToBTagDataEntry.cs
+++ b/src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccLutAToBTagDataEntry.cs
@@ -5,7 +5,7 @@ using System;
using System.Linq;
using System.Numerics;
-namespace SixLabors.ImageSharp
+namespace SixLabors.ImageSharp.MetaData.Profiles.Icc
{
///
/// This structure represents a color transform.
diff --git a/src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccLutBToATagDataEntry.cs b/src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccLutBToATagDataEntry.cs
index 51566c4b0f..10ffca3356 100644
--- a/src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccLutBToATagDataEntry.cs
+++ b/src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccLutBToATagDataEntry.cs
@@ -5,7 +5,7 @@ using System;
using System.Linq;
using System.Numerics;
-namespace SixLabors.ImageSharp
+namespace SixLabors.ImageSharp.MetaData.Profiles.Icc
{
///
/// This structure represents a color transform.
diff --git a/src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccMeasurementTagDataEntry.cs b/src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccMeasurementTagDataEntry.cs
index 31278da621..12010ea09c 100644
--- a/src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccMeasurementTagDataEntry.cs
+++ b/src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccMeasurementTagDataEntry.cs
@@ -4,7 +4,7 @@
using System;
using System.Numerics;
-namespace SixLabors.ImageSharp
+namespace SixLabors.ImageSharp.MetaData.Profiles.Icc
{
///
/// The measurementType information refers only to the internal
diff --git a/src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccMultiLocalizedUnicodeTagDataEntry.cs b/src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccMultiLocalizedUnicodeTagDataEntry.cs
index bdf9162018..62792b44ee 100644
--- a/src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccMultiLocalizedUnicodeTagDataEntry.cs
+++ b/src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccMultiLocalizedUnicodeTagDataEntry.cs
@@ -4,7 +4,7 @@
using System;
using System.Linq;
-namespace SixLabors.ImageSharp
+namespace SixLabors.ImageSharp.MetaData.Profiles.Icc
{
///
/// This tag structure contains a set of records each referencing
diff --git a/src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccMultiProcessElementsTagDataEntry.cs b/src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccMultiProcessElementsTagDataEntry.cs
index 954096f44f..437c6734bb 100644
--- a/src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccMultiProcessElementsTagDataEntry.cs
+++ b/src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccMultiProcessElementsTagDataEntry.cs
@@ -4,7 +4,7 @@
using System;
using System.Linq;
-namespace SixLabors.ImageSharp
+namespace SixLabors.ImageSharp.MetaData.Profiles.Icc
{
///
/// This structure represents a color transform, containing
diff --git a/src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccNamedColor2TagDataEntry.cs b/src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccNamedColor2TagDataEntry.cs
index e7a13c28a8..d3e73b0189 100644
--- a/src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccNamedColor2TagDataEntry.cs
+++ b/src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccNamedColor2TagDataEntry.cs
@@ -4,7 +4,7 @@
using System;
using System.Linq;
-namespace SixLabors.ImageSharp
+namespace SixLabors.ImageSharp.MetaData.Profiles.Icc
{
///
/// The namedColor2Type is a count value and array of structures
diff --git a/src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccParametricCurveTagDataEntry.cs b/src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccParametricCurveTagDataEntry.cs
index 3791083710..192be52a13 100644
--- a/src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccParametricCurveTagDataEntry.cs
+++ b/src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccParametricCurveTagDataEntry.cs
@@ -3,7 +3,7 @@
using System;
-namespace SixLabors.ImageSharp
+namespace SixLabors.ImageSharp.MetaData.Profiles.Icc
{
///
/// The parametricCurveType describes a one-dimensional curve by
diff --git a/src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccProfileSequenceDescTagDataEntry.cs b/src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccProfileSequenceDescTagDataEntry.cs
index e4f6b2e28e..88aaa09768 100644
--- a/src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccProfileSequenceDescTagDataEntry.cs
+++ b/src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccProfileSequenceDescTagDataEntry.cs
@@ -4,7 +4,7 @@
using System;
using System.Linq;
-namespace SixLabors.ImageSharp
+namespace SixLabors.ImageSharp.MetaData.Profiles.Icc
{
///
/// This type is an array of structures, each of which contains information
diff --git a/src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccProfileSequenceIdentifierTagDataEntry.cs b/src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccProfileSequenceIdentifierTagDataEntry.cs
index e980a9715c..7ef17d37ec 100644
--- a/src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccProfileSequenceIdentifierTagDataEntry.cs
+++ b/src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccProfileSequenceIdentifierTagDataEntry.cs
@@ -4,7 +4,7 @@
using System;
using System.Linq;
-namespace SixLabors.ImageSharp
+namespace SixLabors.ImageSharp.MetaData.Profiles.Icc
{
///
/// This type is an array of structures, each of which contains information
diff --git a/src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccResponseCurveSet16TagDataEntry.cs b/src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccResponseCurveSet16TagDataEntry.cs
index dd3f782957..7faad30f32 100644
--- a/src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccResponseCurveSet16TagDataEntry.cs
+++ b/src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccResponseCurveSet16TagDataEntry.cs
@@ -4,7 +4,7 @@
using System;
using System.Linq;
-namespace SixLabors.ImageSharp
+namespace SixLabors.ImageSharp.MetaData.Profiles.Icc
{
///
/// The purpose of this tag type is to provide a mechanism to relate physical
diff --git a/src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccScreeningTagDataEntry.cs b/src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccScreeningTagDataEntry.cs
index dad5d86587..7a5062707d 100644
--- a/src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccScreeningTagDataEntry.cs
+++ b/src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccScreeningTagDataEntry.cs
@@ -4,7 +4,7 @@
using System;
using System.Linq;
-namespace SixLabors.ImageSharp
+namespace SixLabors.ImageSharp.MetaData.Profiles.Icc
{
///
/// This type describes various screening parameters including
diff --git a/src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccSignatureTagDataEntry.cs b/src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccSignatureTagDataEntry.cs
index a6367f55b8..82462afa3c 100644
--- a/src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccSignatureTagDataEntry.cs
+++ b/src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccSignatureTagDataEntry.cs
@@ -3,7 +3,7 @@
using System;
-namespace SixLabors.ImageSharp
+namespace SixLabors.ImageSharp.MetaData.Profiles.Icc
{
///
/// Typically this type is used for registered tags that can
diff --git a/src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccTextDescriptionTagDataEntry.cs b/src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccTextDescriptionTagDataEntry.cs
index 306ad2689f..71030c2a62 100644
--- a/src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccTextDescriptionTagDataEntry.cs
+++ b/src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccTextDescriptionTagDataEntry.cs
@@ -4,7 +4,7 @@
using System;
using System.Globalization;
-namespace SixLabors.ImageSharp
+namespace SixLabors.ImageSharp.MetaData.Profiles.Icc
{
///
/// The TextDescriptionType contains three types of text description.
diff --git a/src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccTextTagDataEntry.cs b/src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccTextTagDataEntry.cs
index 772782619b..8127fae29e 100644
--- a/src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccTextTagDataEntry.cs
+++ b/src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccTextTagDataEntry.cs
@@ -3,7 +3,7 @@
using System;
-namespace SixLabors.ImageSharp
+namespace SixLabors.ImageSharp.MetaData.Profiles.Icc
{
///
/// This is a simple text structure that contains a text string.
diff --git a/src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccUFix16ArrayTagDataEntry.cs b/src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccUFix16ArrayTagDataEntry.cs
index 77f8e1c87e..709106a52e 100644
--- a/src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccUFix16ArrayTagDataEntry.cs
+++ b/src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccUFix16ArrayTagDataEntry.cs
@@ -4,7 +4,7 @@
using System;
using System.Linq;
-namespace SixLabors.ImageSharp
+namespace SixLabors.ImageSharp.MetaData.Profiles.Icc
{
///
/// This type represents an array of doubles (from 32bit values).
diff --git a/src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccUInt16ArrayTagDataEntry.cs b/src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccUInt16ArrayTagDataEntry.cs
index c42d5338ce..bcd991ceae 100644
--- a/src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccUInt16ArrayTagDataEntry.cs
+++ b/src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccUInt16ArrayTagDataEntry.cs
@@ -4,7 +4,7 @@
using System;
using System.Linq;
-namespace SixLabors.ImageSharp
+namespace SixLabors.ImageSharp.MetaData.Profiles.Icc
{
///
/// This type represents an array of unsigned shorts.
diff --git a/src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccUInt32ArrayTagDataEntry.cs b/src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccUInt32ArrayTagDataEntry.cs
index d322d48a73..8a5ccb0c08 100644
--- a/src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccUInt32ArrayTagDataEntry.cs
+++ b/src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccUInt32ArrayTagDataEntry.cs
@@ -4,7 +4,7 @@
using System;
using System.Linq;
-namespace SixLabors.ImageSharp
+namespace SixLabors.ImageSharp.MetaData.Profiles.Icc
{
///
/// This type represents an array of unsigned 32bit integers.
diff --git a/src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccUInt64ArrayTagDataEntry.cs b/src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccUInt64ArrayTagDataEntry.cs
index 5ff2b37b75..6e22f77585 100644
--- a/src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccUInt64ArrayTagDataEntry.cs
+++ b/src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccUInt64ArrayTagDataEntry.cs
@@ -4,7 +4,7 @@
using System;
using System.Linq;
-namespace SixLabors.ImageSharp
+namespace SixLabors.ImageSharp.MetaData.Profiles.Icc
{
///
/// This type represents an array of unsigned 64bit integers.
diff --git a/src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccUInt8ArrayTagDataEntry.cs b/src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccUInt8ArrayTagDataEntry.cs
index 72f6dcc573..07e142d49e 100644
--- a/src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccUInt8ArrayTagDataEntry.cs
+++ b/src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccUInt8ArrayTagDataEntry.cs
@@ -4,7 +4,7 @@
using System;
using System.Linq;
-namespace SixLabors.ImageSharp
+namespace SixLabors.ImageSharp.MetaData.Profiles.Icc
{
///
/// This type represents an array of bytes.
diff --git a/src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccUcrBgTagDataEntry.cs b/src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccUcrBgTagDataEntry.cs
index e189e9ae70..0f8bd6c33d 100644
--- a/src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccUcrBgTagDataEntry.cs
+++ b/src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccUcrBgTagDataEntry.cs
@@ -4,7 +4,7 @@
using System;
using System.Linq;
-namespace SixLabors.ImageSharp
+namespace SixLabors.ImageSharp.MetaData.Profiles.Icc
{
///
/// This type contains curves representing the under color removal and black generation
diff --git a/src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccUnknownTagDataEntry.cs b/src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccUnknownTagDataEntry.cs
index 7628a2e14d..8b60aad266 100644
--- a/src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccUnknownTagDataEntry.cs
+++ b/src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccUnknownTagDataEntry.cs
@@ -4,7 +4,7 @@
using System;
using System.Linq;
-namespace SixLabors.ImageSharp
+namespace SixLabors.ImageSharp.MetaData.Profiles.Icc
{
///
/// This tag stores data of an unknown tag data entry
diff --git a/src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccViewingConditionsTagDataEntry.cs b/src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccViewingConditionsTagDataEntry.cs
index 980f5b53bd..2c12066f1c 100644
--- a/src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccViewingConditionsTagDataEntry.cs
+++ b/src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccViewingConditionsTagDataEntry.cs
@@ -4,7 +4,7 @@
using System;
using System.Numerics;
-namespace SixLabors.ImageSharp
+namespace SixLabors.ImageSharp.MetaData.Profiles.Icc
{
///
/// This type represents a set of viewing condition parameters.
diff --git a/src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccXyzTagDataEntry.cs b/src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccXyzTagDataEntry.cs
index 8b41cb5fba..d704fee969 100644
--- a/src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccXyzTagDataEntry.cs
+++ b/src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccXyzTagDataEntry.cs
@@ -5,7 +5,7 @@ using System;
using System.Linq;
using System.Numerics;
-namespace SixLabors.ImageSharp
+namespace SixLabors.ImageSharp.MetaData.Profiles.Icc
{
///
/// The XYZType contains an array of XYZ values.
diff --git a/src/ImageSharp/MetaData/Profiles/ICC/Various/IccClut.cs b/src/ImageSharp/MetaData/Profiles/ICC/Various/IccClut.cs
index d9d8dc9ee7..af7e3e0114 100644
--- a/src/ImageSharp/MetaData/Profiles/ICC/Various/IccClut.cs
+++ b/src/ImageSharp/MetaData/Profiles/ICC/Various/IccClut.cs
@@ -4,7 +4,7 @@
using System;
using System.Linq;
-namespace SixLabors.ImageSharp
+namespace SixLabors.ImageSharp.MetaData.Profiles.Icc
{
///
/// Color Lookup Table
diff --git a/src/ImageSharp/MetaData/Profiles/ICC/Various/IccColorantTableEntry.cs b/src/ImageSharp/MetaData/Profiles/ICC/Various/IccColorantTableEntry.cs
index b9b43e9b2a..17127110d6 100644
--- a/src/ImageSharp/MetaData/Profiles/ICC/Various/IccColorantTableEntry.cs
+++ b/src/ImageSharp/MetaData/Profiles/ICC/Various/IccColorantTableEntry.cs
@@ -3,7 +3,7 @@
using System;
-namespace SixLabors.ImageSharp
+namespace SixLabors.ImageSharp.MetaData.Profiles.Icc
{
///
/// Entry of ICC colorant table
diff --git a/src/ImageSharp/MetaData/Profiles/ICC/Various/IccLocalizedString.cs b/src/ImageSharp/MetaData/Profiles/ICC/Various/IccLocalizedString.cs
index 6ffc51dbbd..68a5e7cfa1 100644
--- a/src/ImageSharp/MetaData/Profiles/ICC/Various/IccLocalizedString.cs
+++ b/src/ImageSharp/MetaData/Profiles/ICC/Various/IccLocalizedString.cs
@@ -4,7 +4,7 @@
using System;
using System.Globalization;
-namespace SixLabors.ImageSharp
+namespace SixLabors.ImageSharp.MetaData.Profiles.Icc
{
///
/// A string with a specific locale
diff --git a/src/ImageSharp/MetaData/Profiles/ICC/Various/IccLut.cs b/src/ImageSharp/MetaData/Profiles/ICC/Various/IccLut.cs
index 3777a96eb3..12d3208a7b 100644
--- a/src/ImageSharp/MetaData/Profiles/ICC/Various/IccLut.cs
+++ b/src/ImageSharp/MetaData/Profiles/ICC/Various/IccLut.cs
@@ -4,7 +4,7 @@
using System;
using System.Linq;
-namespace SixLabors.ImageSharp
+namespace SixLabors.ImageSharp.MetaData.Profiles.Icc
{
///
/// Lookup Table
diff --git a/src/ImageSharp/MetaData/Profiles/ICC/Various/IccNamedColor.cs b/src/ImageSharp/MetaData/Profiles/ICC/Various/IccNamedColor.cs
index b59778caf4..98107e8281 100644
--- a/src/ImageSharp/MetaData/Profiles/ICC/Various/IccNamedColor.cs
+++ b/src/ImageSharp/MetaData/Profiles/ICC/Various/IccNamedColor.cs
@@ -4,7 +4,7 @@
using System;
using System.Linq;
-namespace SixLabors.ImageSharp
+namespace SixLabors.ImageSharp.MetaData.Profiles.Icc
{
///
/// A specific color with a name
diff --git a/src/ImageSharp/MetaData/Profiles/ICC/Various/IccPositionNumber.cs b/src/ImageSharp/MetaData/Profiles/ICC/Various/IccPositionNumber.cs
index 9e58fd0281..6258ca2f36 100644
--- a/src/ImageSharp/MetaData/Profiles/ICC/Various/IccPositionNumber.cs
+++ b/src/ImageSharp/MetaData/Profiles/ICC/Various/IccPositionNumber.cs
@@ -3,7 +3,7 @@
using System;
-namespace SixLabors.ImageSharp
+namespace SixLabors.ImageSharp.MetaData.Profiles.Icc
{
///
/// Position of an object within an ICC profile
diff --git a/src/ImageSharp/MetaData/Profiles/ICC/Various/IccProfileDescription.cs b/src/ImageSharp/MetaData/Profiles/ICC/Various/IccProfileDescription.cs
index 2bb894d338..455717a030 100644
--- a/src/ImageSharp/MetaData/Profiles/ICC/Various/IccProfileDescription.cs
+++ b/src/ImageSharp/MetaData/Profiles/ICC/Various/IccProfileDescription.cs
@@ -4,7 +4,7 @@
using System;
using System.Linq;
-namespace SixLabors.ImageSharp
+namespace SixLabors.ImageSharp.MetaData.Profiles.Icc
{
///
/// ICC Profile description
diff --git a/src/ImageSharp/MetaData/Profiles/ICC/Various/IccProfileId.cs b/src/ImageSharp/MetaData/Profiles/ICC/Various/IccProfileId.cs
index 955fd89eb0..1f96540df3 100644
--- a/src/ImageSharp/MetaData/Profiles/ICC/Various/IccProfileId.cs
+++ b/src/ImageSharp/MetaData/Profiles/ICC/Various/IccProfileId.cs
@@ -3,7 +3,7 @@
using System;
-namespace SixLabors.ImageSharp
+namespace SixLabors.ImageSharp.MetaData.Profiles.Icc
{
///
/// ICC Profile ID
diff --git a/src/ImageSharp/MetaData/Profiles/ICC/Various/IccProfileSequenceIdentifier.cs b/src/ImageSharp/MetaData/Profiles/ICC/Various/IccProfileSequenceIdentifier.cs
index 7f5ab7d7fb..dfa3fb2037 100644
--- a/src/ImageSharp/MetaData/Profiles/ICC/Various/IccProfileSequenceIdentifier.cs
+++ b/src/ImageSharp/MetaData/Profiles/ICC/Various/IccProfileSequenceIdentifier.cs
@@ -4,7 +4,7 @@
using System;
using System.Linq;
-namespace SixLabors.ImageSharp
+namespace SixLabors.ImageSharp.MetaData.Profiles.Icc
{
///
/// Description of a profile within a sequence
diff --git a/src/ImageSharp/MetaData/Profiles/ICC/Various/IccResponseNumber.cs b/src/ImageSharp/MetaData/Profiles/ICC/Various/IccResponseNumber.cs
index 4607857c68..a10c55f4e4 100644
--- a/src/ImageSharp/MetaData/Profiles/ICC/Various/IccResponseNumber.cs
+++ b/src/ImageSharp/MetaData/Profiles/ICC/Various/IccResponseNumber.cs
@@ -3,7 +3,7 @@
using System;
-namespace SixLabors.ImageSharp
+namespace SixLabors.ImageSharp.MetaData.Profiles.Icc
{
///
/// Associates a normalized device code with a measurement value
diff --git a/src/ImageSharp/MetaData/Profiles/ICC/Various/IccScreeningChannel.cs b/src/ImageSharp/MetaData/Profiles/ICC/Various/IccScreeningChannel.cs
index dae6abb4da..f41858f303 100644
--- a/src/ImageSharp/MetaData/Profiles/ICC/Various/IccScreeningChannel.cs
+++ b/src/ImageSharp/MetaData/Profiles/ICC/Various/IccScreeningChannel.cs
@@ -3,7 +3,7 @@
using System;
-namespace SixLabors.ImageSharp
+namespace SixLabors.ImageSharp.MetaData.Profiles.Icc
{
///
/// A single channel of a
diff --git a/src/ImageSharp/MetaData/Profiles/ICC/Various/IccTagTableEntry.cs b/src/ImageSharp/MetaData/Profiles/ICC/Various/IccTagTableEntry.cs
index 4d900444fa..5464de9c5f 100644
--- a/src/ImageSharp/MetaData/Profiles/ICC/Various/IccTagTableEntry.cs
+++ b/src/ImageSharp/MetaData/Profiles/ICC/Various/IccTagTableEntry.cs
@@ -3,7 +3,7 @@
using System;
-namespace SixLabors.ImageSharp
+namespace SixLabors.ImageSharp.MetaData.Profiles.Icc
{
///
/// Entry of ICC tag table
diff --git a/src/ImageSharp/PixelFormats/ComponentOrder.cs b/src/ImageSharp/PixelFormats/ComponentOrder.cs
index d7d35726c8..868d082599 100644
--- a/src/ImageSharp/PixelFormats/ComponentOrder.cs
+++ b/src/ImageSharp/PixelFormats/ComponentOrder.cs
@@ -6,7 +6,7 @@ namespace SixLabors.ImageSharp.PixelFormats
///
/// Enumerates the various component orders.
///
- public enum ComponentOrder
+ internal enum ComponentOrder
{
///
/// Z-> Y-> X order. Equivalent to B-> G-> R in
diff --git a/src/ImageSharp/PixelFormats/RgbaComponent.cs b/src/ImageSharp/PixelFormats/RgbaComponent.cs
index edadd5818e..76df62c437 100644
--- a/src/ImageSharp/PixelFormats/RgbaComponent.cs
+++ b/src/ImageSharp/PixelFormats/RgbaComponent.cs
@@ -6,7 +6,7 @@ namespace SixLabors.ImageSharp
///
/// Enumerates the RGBA (red, green, blue, alpha) color components.
///
- public enum RgbaComponent
+ internal enum RgbaComponent
{
///
/// The red component.
diff --git a/src/ImageSharp/Processing/Processors/Binarization/BinaryThresholdProcessor.cs b/src/ImageSharp/Processing/Processors/Binarization/BinaryThresholdProcessor.cs
index 7070c993ef..5fffb89360 100644
--- a/src/ImageSharp/Processing/Processors/Binarization/BinaryThresholdProcessor.cs
+++ b/src/ImageSharp/Processing/Processors/Binarization/BinaryThresholdProcessor.cs
@@ -84,7 +84,7 @@ namespace SixLabors.ImageSharp.Processing.Processors
Parallel.For(
minY,
maxY,
- this.ParallelOptions,
+ source.Configuration.ParallelOptions,
y =>
{
Span row = source.GetRowSpan(y - startY);
diff --git a/src/ImageSharp/Processing/Processors/Binarization/ErrorDiffusionDitherProcessor.cs b/src/ImageSharp/Processing/Processors/Binarization/ErrorDiffusionDitherProcessor.cs
index 2590aa6a00..ec92993a35 100644
--- a/src/ImageSharp/Processing/Processors/Binarization/ErrorDiffusionDitherProcessor.cs
+++ b/src/ImageSharp/Processing/Processors/Binarization/ErrorDiffusionDitherProcessor.cs
@@ -61,39 +61,21 @@ namespace SixLabors.ImageSharp.Processing.Processors
///
protected override void OnApply(ImageBase source, Rectangle sourceRectangle)
{
- int startY = sourceRectangle.Y;
- int endY = sourceRectangle.Bottom;
- int startX = sourceRectangle.X;
- int endX = sourceRectangle.Right;
+ var interest = Rectangle.Intersect(sourceRectangle, source.Bounds());
+ int startY = interest.Y;
+ int endY = interest.Bottom;
+ int startX = interest.X;
+ int endX = interest.Right;
- // Align start/end positions.
- int minX = Math.Max(0, startX);
- int maxX = Math.Min(source.Width, endX);
- int minY = Math.Max(0, startY);
- int maxY = Math.Min(source.Height, endY);
-
- // Reset offset if necessary.
- if (minX > 0)
- {
- startX = 0;
- }
-
- if (minY > 0)
- {
- startY = 0;
- }
-
- for (int y = minY; y < maxY; y++)
+ for (int y = startY; y < endY; y++)
{
- int offsetY = y - startY;
- Span row = source.GetRowSpan(offsetY);
+ Span row = source.GetRowSpan(y);
- for (int x = minX; x < maxX; x++)
+ for (int x = startX; x < endX; x++)
{
- int offsetX = x - startX;
- TPixel sourceColor = row[offsetX];
+ TPixel sourceColor = row[x];
TPixel transformedColor = sourceColor.ToVector4().X >= this.Threshold ? this.UpperColor : this.LowerColor;
- this.Diffuser.Dither(source, sourceColor, transformedColor, offsetX, offsetY, maxX, maxY);
+ this.Diffuser.Dither(source, sourceColor, transformedColor, x, y, startX, startY, endX, endY);
}
}
}
diff --git a/src/ImageSharp/Processing/Processors/Binarization/OrderedDitherProcessor.cs b/src/ImageSharp/Processing/Processors/Binarization/OrderedDitherProcessor.cs
index b71ea97cf7..27114be806 100644
--- a/src/ImageSharp/Processing/Processors/Binarization/OrderedDitherProcessor.cs
+++ b/src/ImageSharp/Processing/Processors/Binarization/OrderedDitherProcessor.cs
@@ -69,39 +69,21 @@ namespace SixLabors.ImageSharp.Processing.Processors
///
protected override void OnApply(ImageBase source, Rectangle sourceRectangle)
{
- int startY = sourceRectangle.Y;
- int endY = sourceRectangle.Bottom;
- int startX = sourceRectangle.X;
- int endX = sourceRectangle.Right;
-
- // Align start/end positions.
- int minX = Math.Max(0, startX);
- int maxX = Math.Min(source.Width, endX);
- int minY = Math.Max(0, startY);
- int maxY = Math.Min(source.Height, endY);
-
- // Reset offset if necessary.
- if (minX > 0)
- {
- startX = 0;
- }
-
- if (minY > 0)
- {
- startY = 0;
- }
+ var interest = Rectangle.Intersect(sourceRectangle, source.Bounds());
+ int startY = interest.Y;
+ int endY = interest.Bottom;
+ int startX = interest.X;
+ int endX = interest.Right;
byte[] bytes = new byte[4];
- for (int y = minY; y < maxY; y++)
+ for (int y = startY; y < endY; y++)
{
- int offsetY = y - startY;
- Span row = source.GetRowSpan(offsetY);
+ Span row = source.GetRowSpan(y);
- for (int x = minX; x < maxX; x++)
+ for (int x = startX; x < endX; x++)
{
- int offsetX = x - startX;
- TPixel sourceColor = row[offsetX];
- this.Dither.Dither(source, sourceColor, this.UpperColor, this.LowerColor, bytes, this.Index, offsetX, offsetY, maxX, maxY);
+ TPixel sourceColor = row[x];
+ this.Dither.Dither(source, sourceColor, this.UpperColor, this.LowerColor, bytes, this.Index, x, y);
}
}
}
diff --git a/src/ImageSharp/Processing/Processors/CloningImageProcessor.cs b/src/ImageSharp/Processing/Processors/CloningImageProcessor.cs
index b4324a9ae3..a1fa3c9cba 100644
--- a/src/ImageSharp/Processing/Processors/CloningImageProcessor.cs
+++ b/src/ImageSharp/Processing/Processors/CloningImageProcessor.cs
@@ -2,7 +2,7 @@
// Licensed under the Apache License, Version 2.0.
using System;
-using System.Threading.Tasks;
+
using SixLabors.ImageSharp.PixelFormats;
using SixLabors.Primitives;
@@ -12,23 +12,12 @@ namespace SixLabors.ImageSharp.Processing
/// Allows the application of processors to images.
///
/// The pixel format.
- internal abstract class CloningImageProcessor : IImageProcessor, ICloningImageProcessor
+ internal abstract class CloningImageProcessor : ICloningImageProcessor
where TPixel : struct, IPixel
{
- ///
- public virtual ParallelOptions ParallelOptions { get; set; }
-
- ///
- public virtual bool Compand { get; set; } = false;
-
///
public Image CloneAndApply(Image source, Rectangle sourceRectangle)
{
- if (this.ParallelOptions == null)
- {
- this.ParallelOptions = source.Configuration.ParallelOptions;
- }
-
try
{
Image clone = this.CreateDestination(source, sourceRectangle);
diff --git a/src/ImageSharp/Processing/Processors/ColorMatrix/BlackWhiteProcessor.cs b/src/ImageSharp/Processing/Processors/ColorMatrix/BlackWhiteProcessor.cs
index d8b6ab9514..9f81273433 100644
--- a/src/ImageSharp/Processing/Processors/ColorMatrix/BlackWhiteProcessor.cs
+++ b/src/ImageSharp/Processing/Processors/ColorMatrix/BlackWhiteProcessor.cs
@@ -1,7 +1,6 @@
// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
-using System;
using System.Numerics;
using SixLabors.ImageSharp.PixelFormats;
diff --git a/src/ImageSharp/Processing/Processors/ColorMatrix/ColorBlindness/AchromatomalyProcessor.cs b/src/ImageSharp/Processing/Processors/ColorMatrix/ColorBlindness/AchromatomalyProcessor.cs
index 1366a8fe1b..91e5c7f68f 100644
--- a/src/ImageSharp/Processing/Processors/ColorMatrix/ColorBlindness/AchromatomalyProcessor.cs
+++ b/src/ImageSharp/Processing/Processors/ColorMatrix/ColorBlindness/AchromatomalyProcessor.cs
@@ -1,7 +1,6 @@
// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
-using System;
using System.Numerics;
using SixLabors.ImageSharp.PixelFormats;
@@ -15,7 +14,7 @@ namespace SixLabors.ImageSharp.Processing.Processors
where TPixel : struct, IPixel
{
///
- public override Matrix4x4 Matrix => new Matrix4x4()
+ public override Matrix4x4 Matrix => new Matrix4x4
{
M11 = .618F,
M12 = .163F,
diff --git a/src/ImageSharp/Processing/Processors/ColorMatrix/ColorBlindness/AchromatopsiaProcessor.cs b/src/ImageSharp/Processing/Processors/ColorMatrix/ColorBlindness/AchromatopsiaProcessor.cs
index d1925e04df..0d6578852c 100644
--- a/src/ImageSharp/Processing/Processors/ColorMatrix/ColorBlindness/AchromatopsiaProcessor.cs
+++ b/src/ImageSharp/Processing/Processors/ColorMatrix/ColorBlindness/AchromatopsiaProcessor.cs
@@ -1,7 +1,6 @@
// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
-using System;
using System.Numerics;
using SixLabors.ImageSharp.PixelFormats;
@@ -15,7 +14,7 @@ namespace SixLabors.ImageSharp.Processing.Processors
where TPixel : struct, IPixel
{
///
- public override Matrix4x4 Matrix => new Matrix4x4()
+ public override Matrix4x4 Matrix => new Matrix4x4
{
M11 = .299F,
M12 = .299F,
diff --git a/src/ImageSharp/Processing/Processors/ColorMatrix/ColorBlindness/DeuteranomalyProcessor.cs b/src/ImageSharp/Processing/Processors/ColorMatrix/ColorBlindness/DeuteranomalyProcessor.cs
index 964921d262..c4bb41ceb3 100644
--- a/src/ImageSharp/Processing/Processors/ColorMatrix/ColorBlindness/DeuteranomalyProcessor.cs
+++ b/src/ImageSharp/Processing/Processors/ColorMatrix/ColorBlindness/DeuteranomalyProcessor.cs
@@ -1,7 +1,6 @@
// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
-using System;
using System.Numerics;
using SixLabors.ImageSharp.PixelFormats;
@@ -15,7 +14,7 @@ namespace SixLabors.ImageSharp.Processing.Processors
where TPixel : struct, IPixel
{
///
- public override Matrix4x4 Matrix => new Matrix4x4()
+ public override Matrix4x4 Matrix => new Matrix4x4
{
M11 = 0.8F,
M12 = 0.258F,
diff --git a/src/ImageSharp/Processing/Processors/ColorMatrix/ColorBlindness/DeuteranopiaProcessor.cs b/src/ImageSharp/Processing/Processors/ColorMatrix/ColorBlindness/DeuteranopiaProcessor.cs
index f35d25a287..598af12ff0 100644
--- a/src/ImageSharp/Processing/Processors/ColorMatrix/ColorBlindness/DeuteranopiaProcessor.cs
+++ b/src/ImageSharp/Processing/Processors/ColorMatrix/ColorBlindness/DeuteranopiaProcessor.cs
@@ -1,7 +1,6 @@
// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
-using System;
using System.Numerics;
using SixLabors.ImageSharp.PixelFormats;
@@ -15,7 +14,7 @@ namespace SixLabors.ImageSharp.Processing.Processors
where TPixel : struct, IPixel
{
///
- public override Matrix4x4 Matrix => new Matrix4x4()
+ public override Matrix4x4 Matrix => new Matrix4x4
{
M11 = 0.625F,
M12 = 0.7F,
diff --git a/src/ImageSharp/Processing/Processors/ColorMatrix/ColorBlindness/ProtanomalyProcessor.cs b/src/ImageSharp/Processing/Processors/ColorMatrix/ColorBlindness/ProtanomalyProcessor.cs
index 4c43ad0e21..4e32cb5298 100644
--- a/src/ImageSharp/Processing/Processors/ColorMatrix/ColorBlindness/ProtanomalyProcessor.cs
+++ b/src/ImageSharp/Processing/Processors/ColorMatrix/ColorBlindness/ProtanomalyProcessor.cs
@@ -1,7 +1,6 @@
// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
-using System;
using System.Numerics;
using SixLabors.ImageSharp.PixelFormats;
@@ -15,7 +14,7 @@ namespace SixLabors.ImageSharp.Processing.Processors
where TPixel : struct, IPixel
{
///
- public override Matrix4x4 Matrix => new Matrix4x4()
+ public override Matrix4x4 Matrix => new Matrix4x4
{
M11 = 0.817F,
M12 = 0.333F,
diff --git a/src/ImageSharp/Processing/Processors/ColorMatrix/ColorBlindness/ProtanopiaProcessor.cs b/src/ImageSharp/Processing/Processors/ColorMatrix/ColorBlindness/ProtanopiaProcessor.cs
index 3a18ed91e2..d49b4a2cc0 100644
--- a/src/ImageSharp/Processing/Processors/ColorMatrix/ColorBlindness/ProtanopiaProcessor.cs
+++ b/src/ImageSharp/Processing/Processors/ColorMatrix/ColorBlindness/ProtanopiaProcessor.cs
@@ -1,7 +1,6 @@
// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
-using System;
using System.Numerics;
using SixLabors.ImageSharp.PixelFormats;
@@ -15,7 +14,7 @@ namespace SixLabors.ImageSharp.Processing.Processors
where TPixel : struct, IPixel
{
///
- public override Matrix4x4 Matrix => new Matrix4x4()
+ public override Matrix4x4 Matrix => new Matrix4x4
{
M11 = 0.567F,
M12 = 0.558F,
diff --git a/src/ImageSharp/Processing/Processors/ColorMatrix/ColorBlindness/TritanomalyProcessor.cs b/src/ImageSharp/Processing/Processors/ColorMatrix/ColorBlindness/TritanomalyProcessor.cs
index 0c337af2d0..d34f22343c 100644
--- a/src/ImageSharp/Processing/Processors/ColorMatrix/ColorBlindness/TritanomalyProcessor.cs
+++ b/src/ImageSharp/Processing/Processors/ColorMatrix/ColorBlindness/TritanomalyProcessor.cs
@@ -1,7 +1,6 @@
// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
-using System;
using System.Numerics;
using SixLabors.ImageSharp.PixelFormats;
@@ -15,7 +14,7 @@ namespace SixLabors.ImageSharp.Processing.Processors
where TPixel : struct, IPixel
{
///
- public override Matrix4x4 Matrix => new Matrix4x4()
+ public override Matrix4x4 Matrix => new Matrix4x4
{
M11 = 0.967F,
M21 = 0.33F,
diff --git a/src/ImageSharp/Processing/Processors/ColorMatrix/ColorBlindness/TritanopiaProcessor.cs b/src/ImageSharp/Processing/Processors/ColorMatrix/ColorBlindness/TritanopiaProcessor.cs
index 76c9f98e74..453ac99a72 100644
--- a/src/ImageSharp/Processing/Processors/ColorMatrix/ColorBlindness/TritanopiaProcessor.cs
+++ b/src/ImageSharp/Processing/Processors/ColorMatrix/ColorBlindness/TritanopiaProcessor.cs
@@ -1,7 +1,6 @@
// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
-using System;
using System.Numerics;
using SixLabors.ImageSharp.PixelFormats;
@@ -15,7 +14,7 @@ namespace SixLabors.ImageSharp.Processing.Processors
where TPixel : struct, IPixel
{
///
- public override Matrix4x4 Matrix => new Matrix4x4()
+ public override Matrix4x4 Matrix => new Matrix4x4
{
M11 = 0.95F,
M21 = 0.05F,
diff --git a/src/ImageSharp/Processing/Processors/ColorMatrix/ColorMatrixProcessor.cs b/src/ImageSharp/Processing/Processors/ColorMatrix/ColorMatrixProcessor.cs
index 45ee1de59e..e93305cca1 100644
--- a/src/ImageSharp/Processing/Processors/ColorMatrix/ColorMatrixProcessor.cs
+++ b/src/ImageSharp/Processing/Processors/ColorMatrix/ColorMatrixProcessor.cs
@@ -13,14 +13,14 @@ namespace SixLabors.ImageSharp.Processing.Processors
/// The color matrix filter. Inherit from this class to perform operation involving color matrices.
///
/// The pixel format.
- internal abstract class ColorMatrixProcessor : ImageProcessor, IColorMatrixFilter
+ internal abstract class ColorMatrixProcessor : ImageProcessor, IColorMatrixProcessor
where TPixel : struct, IPixel
{
///
public abstract Matrix4x4 Matrix { get; }
///
- public override bool Compand { get; set; } = true;
+ public virtual bool Compand { get; set; } = true;
///
protected override void OnApply(ImageBase source, Rectangle sourceRectangle)
@@ -50,31 +50,28 @@ namespace SixLabors.ImageSharp.Processing.Processors
Matrix4x4 matrix = this.Matrix;
bool compand = this.Compand;
- using (PixelAccessor sourcePixels = source.Lock())
- {
- Parallel.For(
- minY,
- maxY,
- this.ParallelOptions,
- y =>
- {
- Span row = source.GetRowSpan(y - startY);
+ Parallel.For(
+ minY,
+ maxY,
+ source.Configuration.ParallelOptions,
+ y =>
+ {
+ Span row = source.GetRowSpan(y - startY);
- for (int x = minX; x < maxX; x++)
- {
- ref TPixel pixel = ref row[x - startX];
- var vector = pixel.ToVector4();
+ for (int x = minX; x < maxX; x++)
+ {
+ ref TPixel pixel = ref row[x - startX];
+ var vector = pixel.ToVector4();
- if (compand)
- {
- vector = vector.Expand();
- }
+ if (compand)
+ {
+ vector = vector.Expand();
+ }
- vector = Vector4.Transform(vector, matrix);
- pixel.PackFromVector4(compand ? vector.Compress() : vector);
- }
- });
- }
+ vector = Vector4.Transform(vector, matrix);
+ pixel.PackFromVector4(compand ? vector.Compress() : vector);
+ }
+ });
}
}
}
\ No newline at end of file
diff --git a/src/ImageSharp/Processing/Processors/ColorMatrix/GrayscaleBt601Processor.cs b/src/ImageSharp/Processing/Processors/ColorMatrix/GrayscaleBt601Processor.cs
index a7033cfc95..35dfe41a82 100644
--- a/src/ImageSharp/Processing/Processors/ColorMatrix/GrayscaleBt601Processor.cs
+++ b/src/ImageSharp/Processing/Processors/ColorMatrix/GrayscaleBt601Processor.cs
@@ -1,7 +1,6 @@
// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
-using System;
using System.Numerics;
using SixLabors.ImageSharp.PixelFormats;
@@ -16,7 +15,7 @@ namespace SixLabors.ImageSharp.Processing.Processors
where TPixel : struct, IPixel
{
///
- public override Matrix4x4 Matrix => new Matrix4x4()
+ public override Matrix4x4 Matrix => new Matrix4x4
{
M11 = .299F,
M12 = .299F,
diff --git a/src/ImageSharp/Processing/Processors/ColorMatrix/GrayscaleBt709Processor.cs b/src/ImageSharp/Processing/Processors/ColorMatrix/GrayscaleBt709Processor.cs
index db7077620a..6bb460ee67 100644
--- a/src/ImageSharp/Processing/Processors/ColorMatrix/GrayscaleBt709Processor.cs
+++ b/src/ImageSharp/Processing/Processors/ColorMatrix/GrayscaleBt709Processor.cs
@@ -1,7 +1,6 @@
// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
-using System;
using System.Numerics;
using SixLabors.ImageSharp.PixelFormats;
@@ -16,7 +15,7 @@ namespace SixLabors.ImageSharp.Processing.Processors
where TPixel : struct, IPixel
{
///
- public override Matrix4x4 Matrix => new Matrix4x4()
+ public override Matrix4x4 Matrix => new Matrix4x4
{
M11 = .2126F,
M12 = .2126F,
diff --git a/src/ImageSharp/Processing/Processors/ColorMatrix/HueProcessor.cs b/src/ImageSharp/Processing/Processors/ColorMatrix/HueProcessor.cs
index a222f195e9..9a40bfca89 100644
--- a/src/ImageSharp/Processing/Processors/ColorMatrix/HueProcessor.cs
+++ b/src/ImageSharp/Processing/Processors/ColorMatrix/HueProcessor.cs
@@ -1,7 +1,6 @@
// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
-using System;
using System.Numerics;
using SixLabors.ImageSharp.PixelFormats;
@@ -46,7 +45,7 @@ namespace SixLabors.ImageSharp.Processing.Processors
// The matrix is set up to preserve the luminance of the image.
// See http://graficaobscura.com/matrix/index.html
// Number are taken from https://msdn.microsoft.com/en-us/library/jj192162(v=vs.85).aspx
- Matrix4x4 matrix4X4 = new Matrix4x4()
+ var matrix4X4 = new Matrix4x4
{
M11 = lumR + (cosradians * oneMinusLumR) - (sinradians * lumR),
M12 = lumR - (cosradians * lumR) - (sinradians * 0.143F),
diff --git a/src/ImageSharp/Processing/Processors/ColorMatrix/IColorMatrixFilter.cs b/src/ImageSharp/Processing/Processors/ColorMatrix/IColorMatrixProcessor.cs
similarity index 70%
rename from src/ImageSharp/Processing/Processors/ColorMatrix/IColorMatrixFilter.cs
rename to src/ImageSharp/Processing/Processors/ColorMatrix/IColorMatrixProcessor.cs
index d7785045fb..84e7461b56 100644
--- a/src/ImageSharp/Processing/Processors/ColorMatrix/IColorMatrixFilter.cs
+++ b/src/ImageSharp/Processing/Processors/ColorMatrix/IColorMatrixProcessor.cs
@@ -1,7 +1,6 @@
// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
-using System;
using System.Numerics;
using SixLabors.ImageSharp.PixelFormats;
@@ -12,12 +11,17 @@ namespace SixLabors.ImageSharp.Processing.Processors
/// alter the image pixels.
///
/// The pixel format.
- internal interface IColorMatrixFilter : IImageProcessor
+ internal interface IColorMatrixProcessor : IImageProcessor
where TPixel : struct, IPixel
{
///
/// Gets the used to alter the image.
///
Matrix4x4 Matrix { get; }
+
+ ///
+ /// Gets or sets a value indicating whether to compress or expand individual pixel color values on processing.
+ ///
+ bool Compand { get; set; }
}
}
diff --git a/src/ImageSharp/Processing/Processors/ColorMatrix/KodachromeProcessor.cs b/src/ImageSharp/Processing/Processors/ColorMatrix/KodachromeProcessor.cs
index e2ab32a70a..4277e1fc2e 100644
--- a/src/ImageSharp/Processing/Processors/ColorMatrix/KodachromeProcessor.cs
+++ b/src/ImageSharp/Processing/Processors/ColorMatrix/KodachromeProcessor.cs
@@ -1,7 +1,6 @@
// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
-using System;
using System.Numerics;
using SixLabors.ImageSharp.PixelFormats;
@@ -15,7 +14,7 @@ namespace SixLabors.ImageSharp.Processing.Processors
where TPixel : struct, IPixel
{
///
- public override Matrix4x4 Matrix => new Matrix4x4()
+ public override Matrix4x4 Matrix => new Matrix4x4
{
M11 = 0.6997023F,
M22 = 0.4609577F,
diff --git a/src/ImageSharp/Processing/Processors/ColorMatrix/LomographProcessor.cs b/src/ImageSharp/Processing/Processors/ColorMatrix/LomographProcessor.cs
index 7ce96fa355..dcb5955c00 100644
--- a/src/ImageSharp/Processing/Processors/ColorMatrix/LomographProcessor.cs
+++ b/src/ImageSharp/Processing/Processors/ColorMatrix/LomographProcessor.cs
@@ -1,7 +1,6 @@
// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
-using System;
using System.Numerics;
using SixLabors.ImageSharp.PixelFormats;
using SixLabors.Primitives;
@@ -16,7 +15,7 @@ namespace SixLabors.ImageSharp.Processing.Processors
where TPixel : struct, IPixel
{
private static readonly TPixel VeryDarkGreen = ColorBuilder.FromRGBA(0, 10, 0, 255);
- private GraphicsOptions options;
+ private readonly GraphicsOptions options;
///
/// Initializes a new instance of the class.
@@ -28,7 +27,7 @@ namespace SixLabors.ImageSharp.Processing.Processors
}
///
- public override Matrix4x4 Matrix => new Matrix4x4()
+ public override Matrix4x4 Matrix => new Matrix4x4
{
M11 = 1.5F,
M22 = 1.45F,
diff --git a/src/ImageSharp/Processing/Processors/ColorMatrix/PolaroidProcessor.cs b/src/ImageSharp/Processing/Processors/ColorMatrix/PolaroidProcessor.cs
index 96fb084cfd..928a641a00 100644
--- a/src/ImageSharp/Processing/Processors/ColorMatrix/PolaroidProcessor.cs
+++ b/src/ImageSharp/Processing/Processors/ColorMatrix/PolaroidProcessor.cs
@@ -1,7 +1,6 @@
// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
-using System;
using System.Numerics;
using SixLabors.ImageSharp.PixelFormats;
using SixLabors.Primitives;
@@ -15,9 +14,9 @@ namespace SixLabors.ImageSharp.Processing.Processors
internal class PolaroidProcessor : ColorMatrixProcessor
where TPixel : struct, IPixel
{
- private static TPixel veryDarkOrange = ColorBuilder.FromRGB(102, 34, 0);
- private static TPixel lightOrange = ColorBuilder.FromRGBA(255, 153, 102, 178);
- private GraphicsOptions options;
+ private static readonly TPixel VeryDarkOrange = ColorBuilder.FromRGB(102, 34, 0);
+ private static readonly TPixel LightOrange = ColorBuilder.FromRGBA(255, 153, 102, 178);
+ private readonly GraphicsOptions options;
///
/// Initializes a new instance of the class.
@@ -29,7 +28,7 @@ namespace SixLabors.ImageSharp.Processing.Processors
}
///
- public override Matrix4x4 Matrix => new Matrix4x4()
+ public override Matrix4x4 Matrix => new Matrix4x4
{
M11 = 1.538F,
M12 = -0.062F,
@@ -49,8 +48,8 @@ namespace SixLabors.ImageSharp.Processing.Processors
///
protected override void AfterApply(ImageBase source, Rectangle sourceRectangle)
{
- new VignetteProcessor(veryDarkOrange, this.options).Apply(source, sourceRectangle);
- new GlowProcessor(lightOrange, source.Width / 4F, this.options).Apply(source, sourceRectangle);
+ new VignetteProcessor(VeryDarkOrange, this.options).Apply(source, sourceRectangle);
+ new GlowProcessor(LightOrange, source.Width / 4F, this.options).Apply(source, sourceRectangle);
}
}
}
\ No newline at end of file
diff --git a/src/ImageSharp/Processing/Processors/ColorMatrix/SaturationProcessor.cs b/src/ImageSharp/Processing/Processors/ColorMatrix/SaturationProcessor.cs
index 38788d9f9e..1f01bc85dc 100644
--- a/src/ImageSharp/Processing/Processors/ColorMatrix/SaturationProcessor.cs
+++ b/src/ImageSharp/Processing/Processors/ColorMatrix/SaturationProcessor.cs
@@ -1,7 +1,6 @@
// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
-using System;
using System.Numerics;
using SixLabors.ImageSharp.PixelFormats;
@@ -39,7 +38,7 @@ namespace SixLabors.ImageSharp.Processing.Processors
float saturationComplementG = 0.6094f * saturationComplement;
float saturationComplementB = 0.0820f * saturationComplement;
- Matrix4x4 matrix4X4 = new Matrix4x4
+ var matrix4X4 = new Matrix4x4
{
M11 = saturationComplementR + saturationFactor,
M12 = saturationComplementR,
diff --git a/src/ImageSharp/Processing/Processors/ColorMatrix/SepiaProcessor.cs b/src/ImageSharp/Processing/Processors/ColorMatrix/SepiaProcessor.cs
index 610b3d5f1c..d959ebf521 100644
--- a/src/ImageSharp/Processing/Processors/ColorMatrix/SepiaProcessor.cs
+++ b/src/ImageSharp/Processing/Processors/ColorMatrix/SepiaProcessor.cs
@@ -1,7 +1,6 @@
// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
-using System;
using System.Numerics;
using SixLabors.ImageSharp.PixelFormats;
diff --git a/src/ImageSharp/Processing/Processors/Convolution/Convolution2DProcessor.cs b/src/ImageSharp/Processing/Processors/Convolution/Convolution2DProcessor.cs
index 1fe31be448..b13117a585 100644
--- a/src/ImageSharp/Processing/Processors/Convolution/Convolution2DProcessor.cs
+++ b/src/ImageSharp/Processing/Processors/Convolution/Convolution2DProcessor.cs
@@ -62,7 +62,7 @@ namespace SixLabors.ImageSharp.Processing.Processors
Parallel.For(
startY,
endY,
- this.ParallelOptions,
+ source.Configuration.ParallelOptions,
y =>
{
Span sourceRow = source.GetRowSpan(y);
diff --git a/src/ImageSharp/Processing/Processors/Convolution/Convolution2PassProcessor.cs b/src/ImageSharp/Processing/Processors/Convolution/Convolution2PassProcessor.cs
index 16b8075fcf..08ea5a6412 100644
--- a/src/ImageSharp/Processing/Processors/Convolution/Convolution2PassProcessor.cs
+++ b/src/ImageSharp/Processing/Processors/Convolution/Convolution2PassProcessor.cs
@@ -43,12 +43,13 @@ namespace SixLabors.ImageSharp.Processing.Processors
{
int width = source.Width;
int height = source.Height;
+ ParallelOptions parallelOptions = source.Configuration.ParallelOptions;
using (var firstPassPixels = new PixelAccessor