diff --git a/src/ImageProcessor/Imaging/Filters/GreyScaleMatrixFilter.cs b/src/ImageProcessor/Imaging/Filters/GreyScaleMatrixFilter.cs
index 29f87a6764..edf153994f 100644
--- a/src/ImageProcessor/Imaging/Filters/GreyScaleMatrixFilter.cs
+++ b/src/ImageProcessor/Imaging/Filters/GreyScaleMatrixFilter.cs
@@ -8,10 +8,6 @@
namespace ImageProcessor.Imaging.Filters
{
#region Using
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
using System.Drawing;
using System.Drawing.Imaging;
#endregion
diff --git a/src/ImageProcessor/Processors/Flip.cs b/src/ImageProcessor/Processors/Flip.cs
index c536be0171..4b3d5d1b11 100644
--- a/src/ImageProcessor/Processors/Flip.cs
+++ b/src/ImageProcessor/Processors/Flip.cs
@@ -22,7 +22,7 @@ namespace ImageProcessor.Processors
/// The regular expression to search strings for.
///
///
- private static readonly Regex QueryRegex = new Regex(@"flip=(horizontal|vertical)", RegexOptions.Compiled);
+ private static readonly Regex QueryRegex = new Regex(@"flip=(horizontal|vertical|both)", RegexOptions.Compiled);
#region IGraphicsProcessor Members
///
@@ -89,9 +89,18 @@ namespace ImageProcessor.Processors
this.SortOrder = match.Index;
string direction = match.Value.Split('=')[1];
- this.DynamicParameter = direction == "horizontal"
- ? RotateFlipType.RotateNoneFlipX
- : RotateFlipType.RotateNoneFlipY;
+ switch (direction)
+ {
+ case "horizontal":
+ this.DynamicParameter = RotateFlipType.RotateNoneFlipX;
+ break;
+ case "vertical":
+ this.DynamicParameter = RotateFlipType.RotateNoneFlipY;
+ break;
+ default:
+ this.DynamicParameter = RotateFlipType.RotateNoneFlipXY;
+ break;
+ }
}
index += 1;
@@ -121,6 +130,7 @@ namespace ImageProcessor.Processors
RotateFlipType rotateFlipType = this.DynamicParameter;
newImage = (Bitmap)image.Clone();
+
// Tag doesn't get cloned.
newImage.Tag = image.Tag;