diff --git a/src/ImageProcessor.Tests/ImageProcessor.Tests.csproj b/src/ImageProcessor.Tests/ImageProcessor.Tests.csproj
index 3d3e5c2411..e305908f2a 100644
--- a/src/ImageProcessor.Tests/ImageProcessor.Tests.csproj
+++ b/src/ImageProcessor.Tests/ImageProcessor.Tests.csproj
@@ -74,6 +74,10 @@
+
+ {d011a778-59c8-4bfa-a770-c350216bf161}
+ ImageProcessor.Web_NET45
+
{3b5dd734-fb7a-487d-8ce6-55e7af9aea7e}
ImageProcessor
diff --git a/src/ImageProcessor.Tests/RegularExpressionUnitTests.cs b/src/ImageProcessor.Tests/RegularExpressionUnitTests.cs
index 7a62ecfde5..fa7cb24d0c 100644
--- a/src/ImageProcessor.Tests/RegularExpressionUnitTests.cs
+++ b/src/ImageProcessor.Tests/RegularExpressionUnitTests.cs
@@ -11,6 +11,8 @@ namespace ImageProcessor.Tests
using ImageProcessor.Configuration;
using ImageProcessor.Imaging;
+ using ImageProcessor.Imaging.Filters;
+ using ImageProcessor.Imaging.Formats;
using ImageProcessor.Processors;
using Microsoft.VisualStudio.TestTools.UnitTesting;
#endregion
@@ -99,14 +101,14 @@ namespace ImageProcessor.Tests
{
// Should really write more for the other filters.
const string Querystring = "filter=lomograph";
- const string Expected = "lomograph";
+ IMatrixFilter expected = MatrixFilters.Lomograph;
Web.Processors.Filter filter = new Web.Processors.Filter();
filter.MatchRegexIndex(Querystring);
- string actual = filter.Processor.DynamicParameter;
+ IMatrixFilter actual = filter.Processor.DynamicParameter;
- Assert.AreEqual(Expected, actual);
+ Assert.AreEqual(expected, actual);
}
///
@@ -116,14 +118,14 @@ namespace ImageProcessor.Tests
public void TestFormatRegex()
{
const string Querystring = "format=gif";
- const string Expected = "gif";
+ ISupportedImageFormat expected = new GifFormat();
Web.Processors.Format format = new Web.Processors.Format();
format.MatchRegexIndex(Querystring);
- string actual = format.Processor.DynamicParameter;
+ ISupportedImageFormat actual = format.Processor.DynamicParameter;
- Assert.AreEqual(Expected, actual);
+ Assert.AreEqual(expected, actual);
}
///
@@ -185,17 +187,16 @@ namespace ImageProcessor.Tests
{
const string Querystring = "roundedcorners=30";
RoundedCornerLayer expected = new RoundedCornerLayer(30, true, true, true, true);
-
- RoundedCorners roundedCorners = new RoundedCorners();
+ Web.Processors.RoundedCorners roundedCorners = new Web.Processors.RoundedCorners();
roundedCorners.MatchRegexIndex(Querystring);
- RoundedCornerLayer actual = roundedCorners.DynamicParameter;
+ RoundedCornerLayer actual = roundedCorners.Processor.DynamicParameter;
Assert.AreEqual(expected, actual);
}
///
- /// The rounded corners regex unit test.
+ /// The tint regex unit test.
///
[TestMethod]
public void TestTintRegex()
diff --git a/src/ImageProcessor.Web/NET45/ImageProcessor.Web_NET45.csproj b/src/ImageProcessor.Web/NET45/ImageProcessor.Web_NET45.csproj
index f8eb6861a3..7ca861264d 100644
--- a/src/ImageProcessor.Web/NET45/ImageProcessor.Web_NET45.csproj
+++ b/src/ImageProcessor.Web/NET45/ImageProcessor.Web_NET45.csproj
@@ -75,6 +75,7 @@
+
diff --git a/src/ImageProcessor.Web/NET45/Processors/RoundedCorners.cs b/src/ImageProcessor.Web/NET45/Processors/RoundedCorners.cs
index b9d7c43a22..3965db3c31 100644
--- a/src/ImageProcessor.Web/NET45/Processors/RoundedCorners.cs
+++ b/src/ImageProcessor.Web/NET45/Processors/RoundedCorners.cs
@@ -1,11 +1,20 @@
-
+// --------------------------------------------------------------------------------------------------------------------
+//
+// Copyright (c) James South.
+// Licensed under the Apache License, Version 2.0.
+//
+//
+// Encapsulates methods to add rounded corners to an image.
+//
+// --------------------------------------------------------------------------------------------------------------------
+
namespace ImageProcessor.Web.Processors
{
- using System.Drawing;
using System.Globalization;
using System.Text.RegularExpressions;
using ImageProcessor.Imaging;
using ImageProcessor.Processors;
+ using ImageProcessor.Web.Helpers;
///
/// Encapsulates methods to add rounded corners to an image.
@@ -15,37 +24,40 @@ namespace ImageProcessor.Web.Processors
///
/// The regular expression to search strings for.
///
- private static readonly Regex QueryRegex = new Regex(@"roundedcorners=(\d+|[^&]*)", RegexOptions.Compiled);
+ private static readonly Regex QueryRegex = new Regex(@"roundedcorners=[^&]+", RegexOptions.Compiled);
///
/// The regular expression to search strings for the angle attribute.
///
- private static readonly Regex RadiusRegex = new Regex(@"radius-(\d+)", RegexOptions.Compiled);
-
- ///
- /// The regular expression to search strings for the color attribute.
- ///
- private static readonly Regex ColorRegex = new Regex(@"bgcolor-([0-9a-fA-F]{3}){1,2}", RegexOptions.Compiled);
+ private static readonly Regex RadiusRegex = new Regex(@"(roundedcorners|radius)(=|-)(\d+)", RegexOptions.Compiled);
///
/// The regular expression to search strings for the top left attribute.
///
- private static readonly Regex TopLeftRegex = new Regex(@"tl-(true|false)", RegexOptions.Compiled);
+ private static readonly Regex TopLeftRegex = new Regex(@"tl(=|-)(true|false)", RegexOptions.Compiled);
///
/// The regular expression to search strings for the top right attribute.
///
- private static readonly Regex TopRightRegex = new Regex(@"tr-(true|false)", RegexOptions.Compiled);
+ private static readonly Regex TopRightRegex = new Regex(@"tr(=|-)(true|false)", RegexOptions.Compiled);
///
/// The regular expression to search strings for the bottom left attribute.
///
- private static readonly Regex BottomLeftRegex = new Regex(@"bl-(true|false)", RegexOptions.Compiled);
+ private static readonly Regex BottomLeftRegex = new Regex(@"bl(=|-)(true|false)", RegexOptions.Compiled);
///
/// The regular expression to search strings for the bottom right attribute.
///
- private static readonly Regex BottomRightRegex = new Regex(@"br-(true|false)", RegexOptions.Compiled);
+ private static readonly Regex BottomRightRegex = new Regex(@"br(=|-)(true|false)", RegexOptions.Compiled);
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ public RoundedCorners()
+ {
+ this.Processor = new ImageProcessor.Processors.RoundedCorners();
+ }
///
/// Gets the regular expression to search strings for.
@@ -91,21 +103,13 @@ namespace ImageProcessor.Web.Processors
// Set the index on the first instance only.
this.SortOrder = match.Index;
- RoundedCornerLayer roundedCornerLayer;
-
- string toParse = match.Value;
-
- if (toParse.Contains("bgcolor"))
- {
- roundedCornerLayer = new RoundedCornerLayer(this.ParseRadius(toParse), this.ParseColor(toParse), this.ParseCorner(TopLeftRegex, toParse), this.ParseCorner(TopRightRegex, toParse), this.ParseCorner(BottomLeftRegex, toParse), this.ParseCorner(BottomRightRegex, toParse));
- }
- else
- {
- int radius;
- int.TryParse(match.Value.Split('=')[1], NumberStyles.Any, CultureInfo.InvariantCulture, out radius);
-
- roundedCornerLayer = new RoundedCornerLayer(radius, this.ParseCorner(TopLeftRegex, toParse), this.ParseCorner(TopRightRegex, toParse), this.ParseCorner(BottomLeftRegex, toParse), this.ParseCorner(BottomRightRegex, toParse));
- }
+ RoundedCornerLayer roundedCornerLayer = new RoundedCornerLayer(
+ this.ParseRadius(queryString),
+ CommonParameterParserUtility.ParseColor(queryString),
+ this.ParseCorner(TopLeftRegex, queryString),
+ this.ParseCorner(TopRightRegex, queryString),
+ this.ParseCorner(BottomLeftRegex, queryString),
+ this.ParseCorner(BottomRightRegex, queryString));
this.Processor.DynamicParameter = roundedCornerLayer;
}
@@ -133,34 +137,14 @@ namespace ImageProcessor.Web.Processors
{
// Split on radius-
int radius;
- int.TryParse(match.Value.Split('-')[1], NumberStyles.Any, CultureInfo.InvariantCulture, out radius);
+ int.TryParse(match.Value.Split(new[] { '=', '-' })[1], NumberStyles.Any, CultureInfo.InvariantCulture, out radius);
return radius;
}
- // No rotate - matches the RotateLayer default.
+ // No corners - matches the RoundedCorner default.
return 0;
}
- ///
- /// Returns the correct for the given string.
- ///
- ///
- /// The input string containing the value to parse.
- ///
- ///
- /// The correct
- ///
- private Color ParseColor(string input)
- {
- foreach (Match match in ColorRegex.Matches(input))
- {
- // split on color-hex
- return ColorTranslator.FromHtml("#" + match.Value.Split('-')[1]);
- }
-
- return Color.Transparent;
- }
-
///
/// Returns a either true or false.
///
@@ -179,11 +163,11 @@ namespace ImageProcessor.Web.Processors
{
// Split on corner-
bool cornerRound;
- bool.TryParse(match.Value.Split('-')[1], out cornerRound);
+ bool.TryParse(match.Value.Split(new[] { '=', '-' })[1], out cornerRound);
return cornerRound;
}
- // No rotate - matches the RotateLayer default.
+ // No corners - matches the RoundedCorner default.
return true;
}
#endregion
diff --git a/src/ImageProcessor/ImageProcessor.csproj b/src/ImageProcessor/ImageProcessor.csproj
index 4cac9981b7..c11410731c 100644
--- a/src/ImageProcessor/ImageProcessor.csproj
+++ b/src/ImageProcessor/ImageProcessor.csproj
@@ -76,6 +76,7 @@
+
diff --git a/src/ImageProcessor/Imaging/Convolution.cs b/src/ImageProcessor/Imaging/Convolution.cs
index 1d8088970b..26ff21f6f1 100644
--- a/src/ImageProcessor/Imaging/Convolution.cs
+++ b/src/ImageProcessor/Imaging/Convolution.cs
@@ -257,7 +257,7 @@ namespace ImageProcessor.Imaging
///
/// Processes the given kernel to produce an array of pixels representing a bitmap.
///
- /// The the image to process.
+ /// The image to process.
/// The Gaussian kernel to use when performing the method
/// A processed bitmap.
public Bitmap ProcessKernel(Bitmap sourceBitmap, double[,] kernel)
diff --git a/src/ImageProcessor/Imaging/Filters/BlackWhiteMatrixFilter.cs b/src/ImageProcessor/Imaging/Filters/BlackWhiteMatrixFilter.cs
index 106c1821d6..47cd4c5404 100644
--- a/src/ImageProcessor/Imaging/Filters/BlackWhiteMatrixFilter.cs
+++ b/src/ImageProcessor/Imaging/Filters/BlackWhiteMatrixFilter.cs
@@ -18,12 +18,12 @@ namespace ImageProcessor.Imaging.Filters
///
/// Encapsulates methods with which to add a black and white filter to an image.
///
- internal class BlackWhiteMatrixFilter : IMatrixFilter
+ internal class BlackWhiteMatrixFilter : MatrixFilterBase
{
///
/// Gets the for this filter instance.
///
- public ColorMatrix Matrix
+ public override ColorMatrix Matrix
{
get { return ColorMatrixes.BlackWhite; }
}
@@ -32,7 +32,7 @@ namespace ImageProcessor.Imaging.Filters
/// Processes the image.
///
///
- /// The the current instance of the class containing
+ /// The current instance of the class containing
/// the image to process.
///
/// The current image to process
@@ -40,7 +40,7 @@ namespace ImageProcessor.Imaging.Filters
///
/// The processed image from the current instance of the class.
///
- public Image TransformImage(ImageFactory factory, Image image, Image newImage)
+ public override Image TransformImage(ImageFactory factory, Image image, Image newImage)
{
using (Graphics graphics = Graphics.FromImage(newImage))
{
diff --git a/src/ImageProcessor/Imaging/Filters/ColorMatrixes.cs b/src/ImageProcessor/Imaging/Filters/ColorMatrixes.cs
index b1471fee0f..4861d2481a 100644
--- a/src/ImageProcessor/Imaging/Filters/ColorMatrixes.cs
+++ b/src/ImageProcessor/Imaging/Filters/ColorMatrixes.cs
@@ -10,10 +10,7 @@
namespace ImageProcessor.Imaging.Filters
{
- #region Using
- using System.Diagnostics.CodeAnalysis;
using System.Drawing.Imaging;
- #endregion
///
/// A list of available color matrices to apply to an image.
@@ -21,24 +18,56 @@ namespace ImageProcessor.Imaging.Filters
internal static class ColorMatrixes
{
///
- /// Gets the for generating the sepia filter.
+ /// The for generating the black and white filter.
///
- internal static ColorMatrix Sepia
- {
- get
- {
- return
- new ColorMatrix(
- new[]
- {
- new[] { .393f, .349f, .272f, 0, 0 },
- new[] { .769f, .686f, .534f, 0, 0 },
- new[] { .189f, .168f, .131f, 0, 0 },
- new float[] { 0, 0, 0, 1, 0 },
- new float[] { 0, 0, 0, 0, 1 }
- });
- }
- }
+ private static ColorMatrix blackWhite;
+
+ ///
+ /// Gets the for generating the high pass
+ /// on the comic book filter.
+ ///
+ private static ColorMatrix comicHigh;
+
+ ///
+ /// Gets for generating the low pass
+ /// on the comic book filter.
+ ///
+ private static ColorMatrix comicLow;
+
+ ///
+ /// The for generating the greyscale filter.
+ ///
+ private static ColorMatrix greyScale;
+
+ ///
+ /// The for generating the high saturation filter.
+ ///
+ private static ColorMatrix hiSatch;
+
+ ///
+ /// The for generating the invert filter.
+ ///
+ private static ColorMatrix invert;
+
+ ///
+ /// The for generating the lomograph filter.
+ ///
+ private static ColorMatrix lomograph;
+
+ ///
+ /// The for generating the low saturation filter.
+ ///
+ private static ColorMatrix loSatch;
+
+ ///
+ /// The for generating the polaroid filter.
+ ///
+ private static ColorMatrix polaroid;
+
+ ///
+ /// The for generating the sepia filter.
+ ///
+ private static ColorMatrix sepia;
///
/// Gets the for generating the black and white filter.
@@ -47,7 +76,7 @@ namespace ImageProcessor.Imaging.Filters
{
get
{
- return new ColorMatrix(
+ return blackWhite ?? (blackWhite = new ColorMatrix(
new[]
{
new[] { 1.5f, 1.5f, 1.5f, 0, 0 },
@@ -55,45 +84,47 @@ namespace ImageProcessor.Imaging.Filters
new[] { 1.5f, 1.5f, 1.5f, 0, 0 },
new float[] { 0, 0, 0, 1, 0 },
new float[] { -1, -1, -1, 0, 1 }
- });
+ }));
}
}
///
- /// Gets the for generating the polaroid filter.
+ /// Gets the for generating the high pass
+ /// on the comic book filter.
///
- internal static ColorMatrix Polaroid
+ internal static ColorMatrix ComicHigh
{
get
{
- return new ColorMatrix(
+ return comicHigh ?? (comicHigh = new ColorMatrix(
new[]
{
- new[] { 1.638f, -0.062f, -0.262f, 0, 0 },
- new[] { -0.122f, 1.378f, -0.122f, 0, 0 },
- new[] { 1.016f, -0.016f, 1.383f, 0, 0 },
+ new[] { 2, -0.5f, -0.5f, 0, 0 },
+ new[] { -0.5f, 2, -0.5f, 0, 0 },
+ new[] { -0.5f, -0.5f, 2, 0, 0 },
new float[] { 0, 0, 0, 1, 0 },
- new[] { 0.06f, -0.05f, -0.05f, 0, 1 }
- });
+ new float[] { 0, 0, 0, 0, 1 }
+ }));
}
}
///
- /// Gets the for generating the lomograph filter.
+ /// Gets for generating the low pass
+ /// on the comic book filter.
///
- internal static ColorMatrix Lomograph
+ internal static ColorMatrix ComicLow
{
get
{
- return new ColorMatrix(
- new[]
+ return comicLow ?? (comicLow = new ColorMatrix(
+ new[]
{
- new[] { 1.50f, 0, 0, 0, 0 },
- new[] { 0, 1.45f, 0, 0, 0 },
- new[] { 0, 0, 1.09f, 0, 0 },
+ new float[] { 1, 0, 0, 0, 0 },
+ new float[] { 0, 1, 0, 0, 0 },
+ new float[] { 0, 0, 1, 0, 0 },
new float[] { 0, 0, 0, 1, 0 },
- new[] { -0.10f, 0.05f, -0.08f, 0, 1 }
- });
+ new[] { .075f, .075f, .075f, 0, 1 }
+ }));
}
}
@@ -104,7 +135,7 @@ namespace ImageProcessor.Imaging.Filters
{
get
{
- return new ColorMatrix(
+ return greyScale ?? (greyScale = new ColorMatrix(
new[]
{
new[] { .33f, .33f, .33f, 0, 0 },
@@ -112,7 +143,26 @@ namespace ImageProcessor.Imaging.Filters
new[] { .11f, .11f, .11f, 0, 0 },
new float[] { 0, 0, 0, 1, 0 },
new float[] { 0, 0, 0, 0, 1 }
- });
+ }));
+ }
+ }
+
+ ///
+ /// Gets the for generating the high saturation filter.
+ ///
+ internal static ColorMatrix HiSatch
+ {
+ get
+ {
+ return hiSatch ?? (hiSatch = new ColorMatrix(
+ new[]
+ {
+ new float[] { 3, -1, -1, 0, 0 },
+ new float[] { -1, 3, -1, 0, 0 },
+ new float[] { -1, -1, 3, 0, 0 },
+ new float[] { 0, 0, 0, 1, 0 },
+ new float[] { 0, 0, 0, 0, 1 }
+ }));
}
}
@@ -123,7 +173,7 @@ namespace ImageProcessor.Imaging.Filters
{
get
{
- return new ColorMatrix(
+ return invert ?? (invert = new ColorMatrix(
new[]
{
new float[] { -1, 0, 0, 0, 0 },
@@ -131,39 +181,38 @@ namespace ImageProcessor.Imaging.Filters
new float[] { 0, 0, -1, 0, 0 },
new float[] { 0, 0, 0, 1, 0 },
new float[] { 1, 1, 1, 0, 1 }
- });
+ }));
}
}
///
- /// Gets the for generating the high saturation filter.
+ /// Gets the for generating the lomograph filter.
///
- [SuppressMessage("StyleCop.CSharp.DocumentationRules", "SA1650:ElementDocumentationMustBeSpelledCorrectly", Justification = "Reviewed. Suppression is OK here.")]
- internal static ColorMatrix HiSatch
+ internal static ColorMatrix Lomograph
{
get
{
- return new ColorMatrix(
- new[]
- {
- new float[] { 3, -1, -1, 0, 0 },
- new float[] { -1, 3, -1, 0, 0 },
- new float[] { -1, -1, 3, 0, 0 },
- new float[] { 0, 0, 0, 1, 0 },
- new float[] { 0, 0, 0, 0, 1 }
- });
+ return lomograph
+ ?? (lomograph = new ColorMatrix(
+ new[]
+ {
+ new[] { 1.50f, 0, 0, 0, 0 },
+ new[] { 0, 1.45f, 0, 0, 0 },
+ new[] { 0, 0, 1.09f, 0, 0 },
+ new float[] { 0, 0, 0, 1, 0 },
+ new[] { -0.10f, 0.05f, -0.08f, 0, 1 }
+ }));
}
}
///
/// Gets the for generating the low saturation filter.
///
- [SuppressMessage("StyleCop.CSharp.DocumentationRules", "SA1650:ElementDocumentationMustBeSpelledCorrectly", Justification = "Reviewed. Suppression is OK here.")]
internal static ColorMatrix LoSatch
{
get
{
- return new ColorMatrix(
+ return loSatch ?? (loSatch = new ColorMatrix(
new[]
{
new float[] { 1, 0, 0, 0, 0 },
@@ -171,48 +220,46 @@ namespace ImageProcessor.Imaging.Filters
new float[] { 0, 0, 1, 0, 0 },
new float[] { 0, 0, 0, 1, 0 },
new[] { .25f, .25f, .25f, 0, 1 }
- });
+ }));
}
}
///
- /// Gets the for generating the high pass
- /// on the comic book filter.
+ /// Gets the for generating the polaroid filter.
///
- internal static ColorMatrix ComicHigh
+ internal static ColorMatrix Polaroid
{
get
{
- return new ColorMatrix(
+ return polaroid ?? (polaroid = new ColorMatrix(
new[]
{
- new[] { 2, -0.5f, -0.5f, 0, 0 },
- new[] { -0.5f, 2, -0.5f, 0, 0 },
- new[] { -0.5f, -0.5f, 2, 0, 0 },
+ new[] { 1.638f, -0.062f, -0.262f, 0, 0 },
+ new[] { -0.122f, 1.378f, -0.122f, 0, 0 },
+ new[] { 1.016f, -0.016f, 1.383f, 0, 0 },
new float[] { 0, 0, 0, 1, 0 },
- new float[] { 0, 0, 0, 0, 1 }
- });
+ new[] { 0.06f, -0.05f, -0.05f, 0, 1 }
+ }));
}
}
///
- /// Gets for generating the low pass
- /// on the comic book filter.
+ /// Gets the for generating the sepia filter.
///
- internal static ColorMatrix ComicLow
+ internal static ColorMatrix Sepia
{
get
{
- return new ColorMatrix(
- new[]
+ return sepia ?? (sepia = new ColorMatrix(
+ new[]
{
- new float[] { 1, 0, 0, 0, 0 },
- new float[] { 0, 1, 0, 0, 0 },
- new float[] { 0, 0, 1, 0, 0 },
+ new[] { .393f, .349f, .272f, 0, 0 },
+ new[] { .769f, .686f, .534f, 0, 0 },
+ new[] { .189f, .168f, .131f, 0, 0 },
new float[] { 0, 0, 0, 1, 0 },
- new[] { .075f, .075f, .075f, 0, 1 }
- });
+ new float[] { 0, 0, 0, 0, 1 }
+ }));
}
}
}
-}
+}
\ No newline at end of file
diff --git a/src/ImageProcessor/Imaging/Filters/ComicMatrixFilter.cs b/src/ImageProcessor/Imaging/Filters/ComicMatrixFilter.cs
index 86fead6767..872551b564 100644
--- a/src/ImageProcessor/Imaging/Filters/ComicMatrixFilter.cs
+++ b/src/ImageProcessor/Imaging/Filters/ComicMatrixFilter.cs
@@ -23,7 +23,7 @@ namespace ImageProcessor.Imaging.Filters
///
/// Encapsulates methods with which to add a comic filter to an image.
///
- internal class ComicMatrixFilter : IMatrixFilter
+ internal class ComicMatrixFilter : MatrixFilterBase
{
///
/// Enumerates Argb color channels.
@@ -45,7 +45,7 @@ namespace ImageProcessor.Imaging.Filters
///
/// Gets the for this filter instance.
///
- public ColorMatrix Matrix
+ public override ColorMatrix Matrix
{
get { return ColorMatrixes.ComicLow; }
}
@@ -54,7 +54,7 @@ namespace ImageProcessor.Imaging.Filters
/// Processes the image.
///
///
- /// The the current instance of the class containing
+ /// The current instance of the class containing
/// the image to process.
///
/// The current image to process
@@ -62,7 +62,7 @@ namespace ImageProcessor.Imaging.Filters
///
/// The processed image from the current instance of the class.
///
- public Image TransformImage(ImageFactory factory, Image image, Image newImage)
+ public override Image TransformImage(ImageFactory factory, Image image, Image newImage)
{
// Bitmaps for comic pattern
Bitmap highBitmap = null;
@@ -135,7 +135,7 @@ namespace ImageProcessor.Imaging.Filters
graphics.DrawImage(highBitmap, 0, 0);
graphics.DrawImage(lowBitmap, 0, 0);
graphics.DrawImage(edgeBitmap, 0, 0);
-
+
// Draw an edge around the image.
using (Pen blackPen = new Pen(Color.Black))
{
diff --git a/src/ImageProcessor/Imaging/Filters/GothamMatrixFilter.cs b/src/ImageProcessor/Imaging/Filters/GothamMatrixFilter.cs
index abeaedf5cb..7db4d3400b 100644
--- a/src/ImageProcessor/Imaging/Filters/GothamMatrixFilter.cs
+++ b/src/ImageProcessor/Imaging/Filters/GothamMatrixFilter.cs
@@ -22,12 +22,12 @@ namespace ImageProcessor.Imaging.Filters
///
/// Encapsulates methods with which to add a gotham filter to an image.
///
- internal class GothamMatrixFilter : IMatrixFilter
+ internal class GothamMatrixFilter : MatrixFilterBase
{
///
/// Gets the for this filter instance.
///
- public ColorMatrix Matrix
+ public override ColorMatrix Matrix
{
get { return ColorMatrixes.GreyScale; }
}
@@ -36,7 +36,7 @@ namespace ImageProcessor.Imaging.Filters
/// Processes the image.
///
///
- /// The the current instance of the class containing
+ /// The current instance of the class containing
/// the image to process.
///
/// The current image to process
@@ -44,7 +44,7 @@ namespace ImageProcessor.Imaging.Filters
///
/// The processed image from the current instance of the class.
///
- public Image TransformImage(ImageFactory factory, Image image, Image newImage)
+ public override Image TransformImage(ImageFactory factory, Image image, Image newImage)
{
using (Graphics graphics = Graphics.FromImage(newImage))
{
diff --git a/src/ImageProcessor/Imaging/Filters/GreyScaleMatrixFilter.cs b/src/ImageProcessor/Imaging/Filters/GreyScaleMatrixFilter.cs
index 677ac1c975..11cee5b2f5 100644
--- a/src/ImageProcessor/Imaging/Filters/GreyScaleMatrixFilter.cs
+++ b/src/ImageProcessor/Imaging/Filters/GreyScaleMatrixFilter.cs
@@ -18,12 +18,12 @@ namespace ImageProcessor.Imaging.Filters
///
/// Encapsulates methods with which to add a greyscale filter to an image.
///
- internal class GreyScaleMatrixFilter : IMatrixFilter
+ internal class GreyScaleMatrixFilter : MatrixFilterBase
{
///
/// Gets the for this filter instance.
///
- public ColorMatrix Matrix
+ public override ColorMatrix Matrix
{
get { return ColorMatrixes.GreyScale; }
}
@@ -32,7 +32,7 @@ namespace ImageProcessor.Imaging.Filters
/// Processes the image.
///
///
- /// The the current instance of the class containing
+ /// The current instance of the class containing
/// the image to process.
///
/// The current image to process
@@ -40,7 +40,7 @@ namespace ImageProcessor.Imaging.Filters
///
/// The processed image from the current instance of the class.
///
- public Image TransformImage(ImageFactory factory, Image image, Image newImage)
+ public override Image TransformImage(ImageFactory factory, Image image, Image newImage)
{
using (Graphics graphics = Graphics.FromImage(newImage))
{
diff --git a/src/ImageProcessor/Imaging/Filters/HiSatchMatrixFilter.cs b/src/ImageProcessor/Imaging/Filters/HiSatchMatrixFilter.cs
index 5a8db565d5..035d43f739 100644
--- a/src/ImageProcessor/Imaging/Filters/HiSatchMatrixFilter.cs
+++ b/src/ImageProcessor/Imaging/Filters/HiSatchMatrixFilter.cs
@@ -18,12 +18,12 @@ namespace ImageProcessor.Imaging.Filters
///
/// Encapsulates methods with which to add a high saturated filter to an image.
///
- internal class HiSatchMatrixFilter : IMatrixFilter
+ internal class HiSatchMatrixFilter : MatrixFilterBase
{
///
/// Gets the for this filter instance.
///
- public ColorMatrix Matrix
+ public override ColorMatrix Matrix
{
get { return ColorMatrixes.HiSatch; }
}
@@ -32,7 +32,7 @@ namespace ImageProcessor.Imaging.Filters
/// Processes the image.
///
///
- /// The the current instance of the class containing
+ /// The current instance of the class containing
/// the image to process.
///
/// The current image to process
@@ -40,7 +40,7 @@ namespace ImageProcessor.Imaging.Filters
///
/// The processed image from the current instance of the class.
///
- public Image TransformImage(ImageFactory factory, Image image, Image newImage)
+ public override Image TransformImage(ImageFactory factory, Image image, Image newImage)
{
using (Graphics graphics = Graphics.FromImage(newImage))
{
@@ -61,4 +61,4 @@ namespace ImageProcessor.Imaging.Filters
return image;
}
}
-}
+}
\ No newline at end of file
diff --git a/src/ImageProcessor/Imaging/Filters/IMatrixFilter.cs b/src/ImageProcessor/Imaging/Filters/IMatrixFilter.cs
index 3c773000ef..04d0977b45 100644
--- a/src/ImageProcessor/Imaging/Filters/IMatrixFilter.cs
+++ b/src/ImageProcessor/Imaging/Filters/IMatrixFilter.cs
@@ -30,7 +30,7 @@ namespace ImageProcessor.Imaging.Filters
/// Processes the image.
///
///
- /// The the current instance of the class containing
+ /// The current instance of the class containing
/// the image to process.
///
/// The current image to process
diff --git a/src/ImageProcessor/Imaging/Filters/InvertMatrixFilter.cs b/src/ImageProcessor/Imaging/Filters/InvertMatrixFilter.cs
index fbf8be63f5..c36c607e5a 100644
--- a/src/ImageProcessor/Imaging/Filters/InvertMatrixFilter.cs
+++ b/src/ImageProcessor/Imaging/Filters/InvertMatrixFilter.cs
@@ -18,12 +18,12 @@ namespace ImageProcessor.Imaging.Filters
///
/// Encapsulates methods with which to add an inverted filter to an image.
///
- internal class InvertMatrixFilter : IMatrixFilter
+ internal class InvertMatrixFilter : MatrixFilterBase
{
///
/// Gets the for this filter instance.
///
- public ColorMatrix Matrix
+ public override ColorMatrix Matrix
{
get { return ColorMatrixes.Invert; }
}
@@ -32,7 +32,7 @@ namespace ImageProcessor.Imaging.Filters
/// Processes the image.
///
///
- /// The the current instance of the class containing
+ /// The current instance of the class containing
/// the image to process.
///
/// The current image to process
@@ -40,7 +40,7 @@ namespace ImageProcessor.Imaging.Filters
///
/// The processed image from the current instance of the class.
///
- public Image TransformImage(ImageFactory factory, Image image, Image newImage)
+ public override Image TransformImage(ImageFactory factory, Image image, Image newImage)
{
using (Graphics graphics = Graphics.FromImage(newImage))
{
@@ -61,4 +61,4 @@ namespace ImageProcessor.Imaging.Filters
return image;
}
}
-}
+}
\ No newline at end of file
diff --git a/src/ImageProcessor/Imaging/Filters/LoSatchMatrixFilter.cs b/src/ImageProcessor/Imaging/Filters/LoSatchMatrixFilter.cs
index dbbbcb7997..040aa9ef9b 100644
--- a/src/ImageProcessor/Imaging/Filters/LoSatchMatrixFilter.cs
+++ b/src/ImageProcessor/Imaging/Filters/LoSatchMatrixFilter.cs
@@ -18,12 +18,12 @@ namespace ImageProcessor.Imaging.Filters
///
/// Encapsulates methods with which to add a low saturated filter to an image.
///
- internal class LoSatchMatrixFilter : IMatrixFilter
+ internal class LoSatchMatrixFilter : MatrixFilterBase
{
///
/// Gets the for this filter instance.
///
- public ColorMatrix Matrix
+ public override ColorMatrix Matrix
{
get { return ColorMatrixes.LoSatch; }
}
@@ -32,7 +32,7 @@ namespace ImageProcessor.Imaging.Filters
/// Processes the image.
///
///
- /// The the current instance of the class containing
+ /// The current instance of the class containing
/// the image to process.
///
/// The current image to process
@@ -40,7 +40,7 @@ namespace ImageProcessor.Imaging.Filters
///
/// The processed image from the current instance of the class.
///
- public Image TransformImage(ImageFactory factory, Image image, Image newImage)
+ public override Image TransformImage(ImageFactory factory, Image image, Image newImage)
{
using (Graphics graphics = Graphics.FromImage(newImage))
{
diff --git a/src/ImageProcessor/Imaging/Filters/LomographMatrixFilter.cs b/src/ImageProcessor/Imaging/Filters/LomographMatrixFilter.cs
index 253bb419a0..24d86c76f1 100644
--- a/src/ImageProcessor/Imaging/Filters/LomographMatrixFilter.cs
+++ b/src/ImageProcessor/Imaging/Filters/LomographMatrixFilter.cs
@@ -19,12 +19,12 @@ namespace ImageProcessor.Imaging.Filters
///
/// Encapsulates methods with which to add a lomograph filter to an image.
///
- internal class LomographMatrixFilter : IMatrixFilter
+ internal class LomographMatrixFilter : MatrixFilterBase
{
///
/// Gets the for this filter instance.
///
- public ColorMatrix Matrix
+ public override ColorMatrix Matrix
{
get { return ColorMatrixes.Lomograph; }
}
@@ -33,7 +33,7 @@ namespace ImageProcessor.Imaging.Filters
/// Processes the image.
///
///
- /// The the current instance of the class containing
+ /// The current instance of the class containing
/// the image to process.
///
/// The current image to process
@@ -41,7 +41,7 @@ namespace ImageProcessor.Imaging.Filters
///
/// The processed image from the current instance of the class.
///
- public Image TransformImage(ImageFactory factory, Image image, Image newImage)
+ public override Image TransformImage(ImageFactory factory, Image image, Image newImage)
{
using (Graphics graphics = Graphics.FromImage(newImage))
{
diff --git a/src/ImageProcessor/Imaging/Filters/MatrixFilterBase.cs b/src/ImageProcessor/Imaging/Filters/MatrixFilterBase.cs
new file mode 100644
index 0000000000..bff9d621e3
--- /dev/null
+++ b/src/ImageProcessor/Imaging/Filters/MatrixFilterBase.cs
@@ -0,0 +1,70 @@
+// --------------------------------------------------------------------------------------------------------------------
+//
+// Copyright (c) James South.
+// Licensed under the Apache License, Version 2.0.
+//
+//
+// The matrix filter base contains equality methods.
+//
+// --------------------------------------------------------------------------------------------------------------------
+
+namespace ImageProcessor.Imaging.Filters
+{
+ using System.Drawing;
+ using System.Drawing.Imaging;
+
+ ///
+ /// The matrix filter base contains equality methods.
+ ///
+ public abstract class MatrixFilterBase : IMatrixFilter
+ {
+ ///
+ /// Gets the for this filter instance.
+ ///
+ public abstract ColorMatrix Matrix { get; }
+
+ ///
+ /// Processes the image.
+ ///
+ /// The current instance of the
+ /// class containing
+ /// the image to process.
+ /// The current image to process
+ /// The new Image to return
+ ///
+ /// The processed image from the current instance of the class.
+ ///
+ public abstract Image TransformImage(ImageFactory factory, Image image, Image newImage);
+
+ ///
+ /// Determines whether the specified , is equal to this instance.
+ ///
+ /// The to compare with this instance.
+ ///
+ /// true if the specified is equal to this instance; otherwise, false.
+ ///
+ public override bool Equals(object obj)
+ {
+ IMatrixFilter filter = obj as IMatrixFilter;
+
+ if (filter == null)
+ {
+ return false;
+ }
+
+ return this.GetType().Name == filter.GetType().Name
+ && this.Matrix.Equals(filter.Matrix);
+ }
+
+ ///
+ /// Returns a hash code for this instance.
+ ///
+ ///
+ /// A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table.
+ ///
+ public override int GetHashCode()
+ {
+ return this.GetType().Name.GetHashCode() + this.Matrix.GetHashCode();
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/ImageProcessor/Imaging/Filters/PolaroidMatrixFilter.cs b/src/ImageProcessor/Imaging/Filters/PolaroidMatrixFilter.cs
index af4c5fd4f0..39ccdceeab 100644
--- a/src/ImageProcessor/Imaging/Filters/PolaroidMatrixFilter.cs
+++ b/src/ImageProcessor/Imaging/Filters/PolaroidMatrixFilter.cs
@@ -20,12 +20,12 @@ namespace ImageProcessor.Imaging.Filters
///
/// Encapsulates methods with which to add a Polaroid filter to an image.
///
- internal class PolaroidMatrixFilter : IMatrixFilter
+ internal class PolaroidMatrixFilter : MatrixFilterBase
{
///
/// Gets the for this filter instance.
///
- public ColorMatrix Matrix
+ public override ColorMatrix Matrix
{
get { return ColorMatrixes.Polaroid; }
}
@@ -34,7 +34,7 @@ namespace ImageProcessor.Imaging.Filters
/// Processes the image.
///
///
- /// The the current instance of the class containing
+ /// The current instance of the class containing
/// the image to process.
///
/// The current image to process
@@ -42,7 +42,7 @@ namespace ImageProcessor.Imaging.Filters
///
/// The processed image from the current instance of the class.
///
- public Image TransformImage(ImageFactory factory, Image image, Image newImage)
+ public override Image TransformImage(ImageFactory factory, Image image, Image newImage)
{
using (Graphics graphics = Graphics.FromImage(newImage))
{
diff --git a/src/ImageProcessor/Imaging/Filters/SepiaMatrixFilter.cs b/src/ImageProcessor/Imaging/Filters/SepiaMatrixFilter.cs
index 2a35b6f500..d2f263bb7a 100644
--- a/src/ImageProcessor/Imaging/Filters/SepiaMatrixFilter.cs
+++ b/src/ImageProcessor/Imaging/Filters/SepiaMatrixFilter.cs
@@ -18,12 +18,12 @@ namespace ImageProcessor.Imaging.Filters
///
/// Encapsulates methods with which to add a sepia filter to an image.
///
- internal class SepiaMatrixFilter : IMatrixFilter
+ internal class SepiaMatrixFilter : MatrixFilterBase
{
///
/// Gets the for this filter instance.
///
- public ColorMatrix Matrix
+ public override ColorMatrix Matrix
{
get { return ColorMatrixes.Sepia; }
}
@@ -32,7 +32,7 @@ namespace ImageProcessor.Imaging.Filters
/// Processes the image.
///
///
- /// The the current instance of the class containing
+ /// The current instance of the class containing
/// the image to process.
///
/// The current image to process
@@ -40,7 +40,7 @@ namespace ImageProcessor.Imaging.Filters
///
/// The processed image from the current instance of the class.
///
- public Image TransformImage(ImageFactory factory, Image image, Image newImage)
+ public override Image TransformImage(ImageFactory factory, Image image, Image newImage)
{
using (Graphics graphics = Graphics.FromImage(newImage))
{
@@ -61,4 +61,4 @@ namespace ImageProcessor.Imaging.Filters
return image;
}
}
-}
+}
\ No newline at end of file
diff --git a/src/ImageProcessor/Imaging/Formats/FormatBase.cs b/src/ImageProcessor/Imaging/Formats/FormatBase.cs
index 6bddd946f9..182ddde3b3 100644
--- a/src/ImageProcessor/Imaging/Formats/FormatBase.cs
+++ b/src/ImageProcessor/Imaging/Formats/FormatBase.cs
@@ -14,6 +14,7 @@ namespace ImageProcessor.Imaging.Formats
using System.Drawing;
using System.Drawing.Imaging;
using System.IO;
+ using System.Linq;
///
/// The supported format base. Implement this class when building a supported format.
@@ -83,7 +84,7 @@ namespace ImageProcessor.Imaging.Formats
/// The containing the image information.
///
///
- /// The the .
+ /// The .
///
public virtual Image Load(Stream stream)
{
@@ -119,5 +120,35 @@ namespace ImageProcessor.Imaging.Formats
image.Save(path, this.ImageFormat);
return image;
}
+
+ ///
+ /// Determines whether the specified , is equal to this instance.
+ ///
+ /// The to compare with this instance.
+ ///
+ /// true if the specified is equal to this instance; otherwise, false.
+ ///
+ public override bool Equals(object obj)
+ {
+ ISupportedImageFormat format = obj as ISupportedImageFormat;
+
+ if (format == null)
+ {
+ return false;
+ }
+
+ return this.MimeType.Equals(format.MimeType);
+ }
+
+ ///
+ /// Returns a hash code for this instance.
+ ///
+ ///
+ /// A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table.
+ ///
+ public override int GetHashCode()
+ {
+ return this.MimeType.GetHashCode();
+ }
}
}
diff --git a/src/ImageProcessor/Processors/Alpha.cs b/src/ImageProcessor/Processors/Alpha.cs
index 6301c0e97f..decff92a79 100644
--- a/src/ImageProcessor/Processors/Alpha.cs
+++ b/src/ImageProcessor/Processors/Alpha.cs
@@ -41,7 +41,7 @@ namespace ImageProcessor.Processors
/// Processes the image.
///
///
- /// The the current instance of the class containing
+ /// The current instance of the class containing
/// the image to process.
///
///
diff --git a/src/ImageProcessor/Processors/AutoRotate.cs b/src/ImageProcessor/Processors/AutoRotate.cs
index 0ec872bb5a..a17b6b28fc 100644
--- a/src/ImageProcessor/Processors/AutoRotate.cs
+++ b/src/ImageProcessor/Processors/AutoRotate.cs
@@ -42,7 +42,7 @@ namespace ImageProcessor.Processors
///
/// Processes the image.
///
- /// The the current instance of the
+ /// The current instance of the
/// class containing
/// the image to process.
///
diff --git a/src/ImageProcessor/Processors/BackgroundColor.cs b/src/ImageProcessor/Processors/BackgroundColor.cs
index 357b08014a..3bad95f815 100644
--- a/src/ImageProcessor/Processors/BackgroundColor.cs
+++ b/src/ImageProcessor/Processors/BackgroundColor.cs
@@ -31,7 +31,7 @@ namespace ImageProcessor.Processors
///
/// Processes the image.
///
- /// The the current instance of the
+ /// The current instance of the
/// class containing
/// the image to process.
///
diff --git a/src/ImageProcessor/Processors/Brightness.cs b/src/ImageProcessor/Processors/Brightness.cs
index 56a17cc2b3..ef4a59c2ca 100644
--- a/src/ImageProcessor/Processors/Brightness.cs
+++ b/src/ImageProcessor/Processors/Brightness.cs
@@ -41,7 +41,7 @@ namespace ImageProcessor.Processors
/// Processes the image.
///
///
- /// The the current instance of the class containing
+ /// The current instance of the class containing
/// the image to process.
///
///
diff --git a/src/ImageProcessor/Processors/Contrast.cs b/src/ImageProcessor/Processors/Contrast.cs
index ee4557517d..31d5affcdf 100644
--- a/src/ImageProcessor/Processors/Contrast.cs
+++ b/src/ImageProcessor/Processors/Contrast.cs
@@ -41,7 +41,7 @@ namespace ImageProcessor.Processors
/// Processes the image.
///
///
- /// The the current instance of the class containing
+ /// The current instance of the class containing
/// the image to process.
///
///
diff --git a/src/ImageProcessor/Processors/Crop.cs b/src/ImageProcessor/Processors/Crop.cs
index abf9483ef1..c535639d1f 100644
--- a/src/ImageProcessor/Processors/Crop.cs
+++ b/src/ImageProcessor/Processors/Crop.cs
@@ -45,7 +45,7 @@ namespace ImageProcessor.Processors
/// Processes the image.
///
///
- /// The the current instance of the class containing
+ /// The current instance of the class containing
/// the image to process.
///
///
diff --git a/src/ImageProcessor/Processors/Filter.cs b/src/ImageProcessor/Processors/Filter.cs
index a91ba1d4f4..d09a3b7da5 100644
--- a/src/ImageProcessor/Processors/Filter.cs
+++ b/src/ImageProcessor/Processors/Filter.cs
@@ -44,7 +44,7 @@ namespace ImageProcessor.Processors
/// Processes the image.
///
///
- /// The the current instance of the class containing
+ /// The current instance of the class containing
/// the image to process.
///
///
diff --git a/src/ImageProcessor/Processors/Flip.cs b/src/ImageProcessor/Processors/Flip.cs
index 59eb371621..174347eb7c 100644
--- a/src/ImageProcessor/Processors/Flip.cs
+++ b/src/ImageProcessor/Processors/Flip.cs
@@ -43,7 +43,7 @@ namespace ImageProcessor.Processors
/// Processes the image.
///
///
- /// The the current instance of the class containing
+ /// The current instance of the class containing
/// the image to process.
///
///
diff --git a/src/ImageProcessor/Processors/Format.cs b/src/ImageProcessor/Processors/Format.cs
index 21f5ec278e..dad11fbb3d 100644
--- a/src/ImageProcessor/Processors/Format.cs
+++ b/src/ImageProcessor/Processors/Format.cs
@@ -47,7 +47,7 @@ namespace ImageProcessor.Processors
/// Processes the image.
///
///
- /// The the current instance of the class containing
+ /// The current instance of the class containing
/// the image to process.
///
///
diff --git a/src/ImageProcessor/Processors/GaussianBlur.cs b/src/ImageProcessor/Processors/GaussianBlur.cs
index 3df89045b0..3a36342573 100644
--- a/src/ImageProcessor/Processors/GaussianBlur.cs
+++ b/src/ImageProcessor/Processors/GaussianBlur.cs
@@ -32,7 +32,7 @@ namespace ImageProcessor.Processors
///
/// Processes the image.
///
- /// The the current instance of the class containing
+ /// The current instance of the class containing
/// the image to process.
///
/// The processed image from the current instance of the class.
diff --git a/src/ImageProcessor/Processors/GaussianSharpen.cs b/src/ImageProcessor/Processors/GaussianSharpen.cs
index f27e6f2994..e7fa4f6b7a 100644
--- a/src/ImageProcessor/Processors/GaussianSharpen.cs
+++ b/src/ImageProcessor/Processors/GaussianSharpen.cs
@@ -32,7 +32,7 @@ namespace ImageProcessor.Processors
///
/// Processes the image.
///
- /// The the current instance of the class containing
+ /// The current instance of the class containing
/// the image to process.
///
/// The processed image from the current instance of the class.
diff --git a/src/ImageProcessor/Processors/IGraphicsProcessor.cs b/src/ImageProcessor/Processors/IGraphicsProcessor.cs
index a3c06c0508..79f3e66c69 100644
--- a/src/ImageProcessor/Processors/IGraphicsProcessor.cs
+++ b/src/ImageProcessor/Processors/IGraphicsProcessor.cs
@@ -38,7 +38,7 @@ namespace ImageProcessor.Processors
/// Processes the image.
///
///
- /// The the current instance of the class containing
+ /// The current instance of the class containing
/// the image to process.
///
///
diff --git a/src/ImageProcessor/Processors/Quality.cs b/src/ImageProcessor/Processors/Quality.cs
index 6d4d107439..8df867ae8c 100644
--- a/src/ImageProcessor/Processors/Quality.cs
+++ b/src/ImageProcessor/Processors/Quality.cs
@@ -42,7 +42,7 @@ namespace ImageProcessor.Processors
/// Processes the image.
///
///
- /// The the current instance of the class containing
+ /// The current instance of the class containing
/// the image to process.
///
///
diff --git a/src/ImageProcessor/Processors/Resize.cs b/src/ImageProcessor/Processors/Resize.cs
index 5cbfc2f92c..d0ddcd9b51 100644
--- a/src/ImageProcessor/Processors/Resize.cs
+++ b/src/ImageProcessor/Processors/Resize.cs
@@ -54,7 +54,7 @@ namespace ImageProcessor.Processors
/// Processes the image.
///
///
- /// The the current instance of the class containing
+ /// The current instance of the class containing
/// the image to process.
///
///
@@ -83,7 +83,7 @@ namespace ImageProcessor.Processors
/// The resize image.
///
///
- /// The the current instance of the class containing
+ /// The current instance of the class containing
/// the image to process.
///
///
diff --git a/src/ImageProcessor/Processors/Rotate.cs b/src/ImageProcessor/Processors/Rotate.cs
index 1ce5fd416e..4a5f27dc2f 100644
--- a/src/ImageProcessor/Processors/Rotate.cs
+++ b/src/ImageProcessor/Processors/Rotate.cs
@@ -45,7 +45,7 @@ namespace ImageProcessor.Processors
/// Processes the image.
///
///
- /// The the current instance of the class containing
+ /// The current instance of the class containing
/// the image to process.
///
///
diff --git a/src/ImageProcessor/Processors/RoundedCorners.cs b/src/ImageProcessor/Processors/RoundedCorners.cs
index 20490bf626..19ed6031ec 100644
--- a/src/ImageProcessor/Processors/RoundedCorners.cs
+++ b/src/ImageProcessor/Processors/RoundedCorners.cs
@@ -46,7 +46,7 @@ namespace ImageProcessor.Processors
/// Processes the image.
///
///
- /// The the current instance of the class containing
+ /// The current instance of the class containing
/// the image to process.
///
///
diff --git a/src/ImageProcessor/Processors/Saturation.cs b/src/ImageProcessor/Processors/Saturation.cs
index 9e07ecbfe7..5021a3e35e 100644
--- a/src/ImageProcessor/Processors/Saturation.cs
+++ b/src/ImageProcessor/Processors/Saturation.cs
@@ -47,7 +47,7 @@ namespace ImageProcessor.Processors
/// Processes the image.
///
///
- /// The the current instance of the class containing
+ /// The current instance of the class containing
/// the image to process.
///
///
diff --git a/src/ImageProcessor/Processors/Tint.cs b/src/ImageProcessor/Processors/Tint.cs
index 44453c9698..fb19372bb8 100644
--- a/src/ImageProcessor/Processors/Tint.cs
+++ b/src/ImageProcessor/Processors/Tint.cs
@@ -34,7 +34,7 @@ namespace ImageProcessor.Processors
/// Processes the image.
///
///
- /// The the current instance of the class containing
+ /// The current instance of the class containing
/// the image to process.
///
///
diff --git a/src/ImageProcessor/Processors/Vignette.cs b/src/ImageProcessor/Processors/Vignette.cs
index 23830aedd1..3915d6428e 100644
--- a/src/ImageProcessor/Processors/Vignette.cs
+++ b/src/ImageProcessor/Processors/Vignette.cs
@@ -53,7 +53,7 @@ namespace ImageProcessor.Processors
/// Processes the image.
///
///
- /// The the current instance of the class containing
+ /// The current instance of the class containing
/// the image to process.
///
///
diff --git a/src/ImageProcessor/Processors/Watermark.cs b/src/ImageProcessor/Processors/Watermark.cs
index 136439fbad..4e864037bd 100644
--- a/src/ImageProcessor/Processors/Watermark.cs
+++ b/src/ImageProcessor/Processors/Watermark.cs
@@ -43,7 +43,7 @@ namespace ImageProcessor.Processors
/// Processes the image.
///
///
- /// The the current instance of the class containing
+ /// The current instance of the class containing
/// the image to process.
///
///
diff --git a/src/ImageProcessor/Settings.StyleCop b/src/ImageProcessor/Settings.StyleCop
index 5a4708f044..2e7c82c8c3 100644
--- a/src/ImageProcessor/Settings.StyleCop
+++ b/src/ImageProcessor/Settings.StyleCop
@@ -23,5 +23,13 @@
Licensed under the Apache License, Version 2.0.
+
+
+
+ hi
+ lo
+
+
+
\ No newline at end of file
diff --git a/src/TestWebsites/NET45/Test_Website_NET45/Views/Home/Png.cshtml b/src/TestWebsites/NET45/Test_Website_NET45/Views/Home/Png.cshtml
index d01e7ae8cf..e7619e2336 100644
--- a/src/TestWebsites/NET45/Test_Website_NET45/Views/Home/Png.cshtml
+++ b/src/TestWebsites/NET45/Test_Website_NET45/Views/Home/Png.cshtml
@@ -94,6 +94,13 @@
Alpha
+
+
Rounded Corners
+
Old Syntax
+

+
New Syntax
+

+