From 36842e31f6f3633e40abb682229cf0025d23cf8a Mon Sep 17 00:00:00 2001 From: Robert Mulder Date: Sun, 25 May 2014 16:35:51 +0200 Subject: [PATCH 01/12] New url for full documentation It seems like the documentation url is outdated. Former-commit-id: fc07863e1ba8ecafcece84b5d87e11520983999b --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index a682ace93..8e933ae44 100644 --- a/README.md +++ b/README.md @@ -5,4 +5,4 @@ Imageprocessor is a lightweight library written in C# that allows you to manipul It's fast, extensible, easy to use, comes bundled with some great features and is fully open source. -For full documentation please see [http://jimbobsquarepants.github.io/ImageProcessor/](http://jimbobsquarepants.github.io/ImageProcessor/) +For full documentation please see [http://imageprocessor.org/](http://imageprocessor.org/) From 5307ed155fa73591b6a474a1591a0adf34ac6a27 Mon Sep 17 00:00:00 2001 From: James South Date: Tue, 27 May 2014 17:28:44 +0100 Subject: [PATCH 02/12] Adding more documentation info Former-commit-id: 72675764f268c99cc66478fdec092731f5b8adad --- README.md | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/README.md b/README.md index 8e933ae44..bd07b0401 100644 --- a/README.md +++ b/README.md @@ -6,3 +6,29 @@ Imageprocessor is a lightweight library written in C# that allows you to manipul It's fast, extensible, easy to use, comes bundled with some great features and is fully open source. For full documentation please see [http://imageprocessor.org/](http://imageprocessor.org/) + +##Contributing to ImageProcessor +Contribution is most welcome! I mean, that's what this is all about isn't it? + +Things I would :heart: people to help me out with: + + - Unit tests. I need to get some going for all the regular expressions within the ImageProcessor core plus anywhere else we can think of. If that's your bag please contribute. + - Documentation. Nobody likes doing docs, I've written a lot but my prose is clumsy and verbose. If you think you can make things clearer or you spot any mistakes please submit a pull request (Guide to how the docs work below). + - Async. I'd love someone with real async chops to have a look at the ImageProcessor.Web. It works and it works damn well but I'm no expert on threading so I'm sure someone can improve on it. + +**Just remember to StyleCop all things! :oncoming_police_car:** + +##RoadMap +I want the next version of ImageProcessor to run on all devices. Sadly it looks like using `System.Drawing` will not allow me to do that so I need to have a look at using the classes within [System.Windows.Media.Imaging](http://msdn.microsoft.com/en-us/library/System.Windows.Media.Imaging(v=vs.110).aspx) This is a **LOT** of work so any help that could be offered would be greatly appreciated. + +##Documentation + +ImageProcessor's documentation, included in this repo in the gh_pages directory, is built with [Jekyll](http://jekyllrb.com) and publicly hosted on GitHub Pages at . The docs may also be run locally. + +### Running documentation locally +1. If necessary, [install Jekyll](http://jekyllrb.com/docs/installation) (requires v1.5.x). + - **Windows users:** Read [this unofficial guide](https://github.com/juthilo/run-jekyll-on-windows/) to get Jekyll up and running without problems. +2. From the root `/ImageProcessor` directory, run `jekyll serve` in the command line. +3. Open in your browser to navigate to your site. +Learn more about using Jekyll by reading its [documentation](http://jekyllrb.com/docs/home/). + From 9e31aaf3bc06e76f5a9bf40152ff426025e9bb89 Mon Sep 17 00:00:00 2001 From: James South Date: Tue, 27 May 2014 17:31:42 +0100 Subject: [PATCH 03/12] Missing 0 Former-commit-id: 024727cf1123a001b21eadaa8883b0d7581f5c6a --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index bd07b0401..87a5574f7 100644 --- a/README.md +++ b/README.md @@ -29,6 +29,6 @@ ImageProcessor's documentation, included in this repo in the gh_pages directory, 1. If necessary, [install Jekyll](http://jekyllrb.com/docs/installation) (requires v1.5.x). - **Windows users:** Read [this unofficial guide](https://github.com/juthilo/run-jekyll-on-windows/) to get Jekyll up and running without problems. 2. From the root `/ImageProcessor` directory, run `jekyll serve` in the command line. -3. Open in your browser to navigate to your site. +3. Open in your browser to navigate to your site. Learn more about using Jekyll by reading its [documentation](http://jekyllrb.com/docs/home/). From 0fea3dd0bdb9447fdfc6e1ce86f1f3cf2d2f2226 Mon Sep 17 00:00:00 2001 From: LaurentiuMM Date: Tue, 10 Jun 2014 12:55:52 +0300 Subject: [PATCH 04/12] Fix for allowing the current cache to properly work with images which does not have the same internal format and extension (e.g. PNG internal format and .JPG extension). Former-commit-id: 48e5be302539321726c8bc8d8539d685c807aea3 --- src/ImageProcessor/ImageFactory.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ImageProcessor/ImageFactory.cs b/src/ImageProcessor/ImageFactory.cs index b88c3d3bf..4db12e3f7 100644 --- a/src/ImageProcessor/ImageFactory.cs +++ b/src/ImageProcessor/ImageFactory.cs @@ -860,9 +860,9 @@ namespace ImageProcessor int length = filePath.LastIndexOf(".", StringComparison.Ordinal); string extension = this.ImageFormat.GetFileExtension(this.OriginalExtension); - if (!string.IsNullOrWhiteSpace(extension)) + if (length == -1) { - filePath = length == -1 ? filePath + extension : filePath.Substring(0, length) + extension; + filePath = filePath + extension; } // Fix the colour palette of indexed images. From 3d99866dbf3855bbf5ad7c58c6bb0521c5654a7f Mon Sep 17 00:00:00 2001 From: James South Date: Wed, 18 Jun 2014 22:26:45 +0100 Subject: [PATCH 05/12] Making cache less processor intensive. Former-commit-id: db394894cb92986085049a084ada64d6dd22c9c8 --- build/Build.bat | 2 +- src/ImageProcessor.Web/NET45/Caching/DiskCache.cs | 15 ++++++--------- .../NET45/Properties/AssemblyInfo.cs | 4 ++-- 3 files changed, 9 insertions(+), 12 deletions(-) diff --git a/build/Build.bat b/build/Build.bat index 61973a204..94f43b25c 100644 --- a/build/Build.bat +++ b/build/Build.bat @@ -1,6 +1,6 @@ @ECHO OFF SET version=1.9.3.0 -SET webversion=3.2.7.0 +SET webversion=3.2.8.0 SET webconfigversion=1.1.2.0 ECHO Building ImageProcessor %version%, ImageProcess.Web %webversion% and ImageProcess.Web.Config %webconfigversion% diff --git a/src/ImageProcessor.Web/NET45/Caching/DiskCache.cs b/src/ImageProcessor.Web/NET45/Caching/DiskCache.cs index e48e57207..7d4150f45 100644 --- a/src/ImageProcessor.Web/NET45/Caching/DiskCache.cs +++ b/src/ImageProcessor.Web/NET45/Caching/DiskCache.cs @@ -14,9 +14,9 @@ namespace ImageProcessor.Web.Caching using System; using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; + using System.Globalization; using System.IO; using System.Linq; - using System.Security.Cryptography; using System.Threading.Tasks; using System.Web; using System.Web.Hosting; @@ -286,14 +286,11 @@ namespace ImageProcessor.Web.Caching { // Pull the latest info. imageFileInfo.Refresh(); - using (MD5 md5 = MD5.Create()) - { - using (FileStream stream = File.OpenRead(imageFileInfo.FullName)) - { - byte[] hash = md5.ComputeHash(stream); - streamHash = BitConverter.ToString(hash); - } - } + + // Checking the stream itself is far too processor intensive so we make a best guess. + string creation = imageFileInfo.CreationTimeUtc.ToString(CultureInfo.InvariantCulture); + string length = imageFileInfo.Length.ToString(CultureInfo.InvariantCulture); + streamHash = string.Format("{0}{1}", creation, length); } } } diff --git a/src/ImageProcessor.Web/NET45/Properties/AssemblyInfo.cs b/src/ImageProcessor.Web/NET45/Properties/AssemblyInfo.cs index 8763d6242..e8c655990 100644 --- a/src/ImageProcessor.Web/NET45/Properties/AssemblyInfo.cs +++ b/src/ImageProcessor.Web/NET45/Properties/AssemblyInfo.cs @@ -35,5 +35,5 @@ using ImageProcessor.Web.HttpModules; // // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: -[assembly: AssemblyVersion("3.2.7.0")] -[assembly: AssemblyFileVersion("3.2.7.0")] \ No newline at end of file +[assembly: AssemblyVersion("3.2.8.0")] +[assembly: AssemblyFileVersion("3.2.8.0")] \ No newline at end of file From c256d9b07e03870080976ac2a508a6bf2490c88b Mon Sep 17 00:00:00 2001 From: Thomas Broust Date: Wed, 25 Jun 2014 17:48:47 +0200 Subject: [PATCH 06/12] New unit tests project using NUnit instead of VS tests Former-commit-id: fdb9bf359884a5b8f168228ac45a8e194e4d3d1d --- .gitignore | 3 + .../ImageProcessor.Tests.csproj | 112 ------------------ .../Properties/AssemblyInfo.cs | 36 ------ src/ImageProcessor.Tests/app.config | 15 --- .../ImageProcessor.UnitTests.csproj | 52 ++++++++ .../RegularExpressionUnitTests.cs | 47 +++----- src/ImageProcessor.UnitTests/packages.config | 4 + src/packages/repositories.config | 13 +- 8 files changed, 83 insertions(+), 199 deletions(-) delete mode 100644 src/ImageProcessor.Tests/ImageProcessor.Tests.csproj delete mode 100644 src/ImageProcessor.Tests/Properties/AssemblyInfo.cs delete mode 100644 src/ImageProcessor.Tests/app.config create mode 100644 src/ImageProcessor.UnitTests/ImageProcessor.UnitTests.csproj rename src/{ImageProcessor.Tests => ImageProcessor.UnitTests}/RegularExpressionUnitTests.cs (86%) create mode 100644 src/ImageProcessor.UnitTests/packages.config diff --git a/.gitignore b/.gitignore index 6b6928926..2fc43e4a1 100644 --- a/.gitignore +++ b/.gitignore @@ -64,6 +64,9 @@ local.properties .builds **/*.dotCover +# Xamarin +*.userprefs + ## TODO: If you have NuGet Package Restore enabled, uncomment this packages/ diff --git a/src/ImageProcessor.Tests/ImageProcessor.Tests.csproj b/src/ImageProcessor.Tests/ImageProcessor.Tests.csproj deleted file mode 100644 index 3d3e5c241..000000000 --- a/src/ImageProcessor.Tests/ImageProcessor.Tests.csproj +++ /dev/null @@ -1,112 +0,0 @@ - - - - Debug - AnyCPU - {39911A38-CA06-413C-80AA-39EF60CE984F} - Library - Properties - ImageProcessor.Tests - ImageProcessor.Tests - v4.5 - 512 - {3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - 10.0 - $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) - $(ProgramFiles)\Common Files\microsoft shared\VSTT\$(VisualStudioVersion)\UITestExtensionPackages - False - UnitTest - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - true - bin\x86\Debug\ - DEBUG;TRACE - full - x86 - prompt - MinimumRecommendedRules.ruleset - - - bin\x86\Release\ - TRACE - true - pdbonly - AnyCPU - prompt - MinimumRecommendedRules.ruleset - - - - - - - - - - - - - - - - - - - - - - - - - {3b5dd734-fb7a-487d-8ce6-55e7af9aea7e} - ImageProcessor - - - - - - - - - - False - - - False - - - False - - - False - - - - - - - - \ No newline at end of file diff --git a/src/ImageProcessor.Tests/Properties/AssemblyInfo.cs b/src/ImageProcessor.Tests/Properties/AssemblyInfo.cs deleted file mode 100644 index e2341f344..000000000 --- a/src/ImageProcessor.Tests/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,36 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("ImageProcessor.Tests")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("ImageProcessor.Tests")] -[assembly: AssemblyCopyright("Copyright © 2013")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("ab617b65-7259-4dc5-9dad-81a7c6537a4f")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/src/ImageProcessor.Tests/app.config b/src/ImageProcessor.Tests/app.config deleted file mode 100644 index 7d285c859..000000000 --- a/src/ImageProcessor.Tests/app.config +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/ImageProcessor.UnitTests/ImageProcessor.UnitTests.csproj b/src/ImageProcessor.UnitTests/ImageProcessor.UnitTests.csproj new file mode 100644 index 000000000..5552927ec --- /dev/null +++ b/src/ImageProcessor.UnitTests/ImageProcessor.UnitTests.csproj @@ -0,0 +1,52 @@ + + + + Debug + AnyCPU + {03CA9055-F997-428C-BF28-F50F991777C6} + Library + ImageProcessor.UnitTests + ImageProcessor.UnitTests + Client + + + true + full + false + bin\Debug + DEBUG; + prompt + 4 + false + + + full + true + bin\Release + prompt + 4 + false + + + + + + ..\packages\NUnit.2.6.3\lib\nunit.framework.dll + + + + + + + + + + + {3B5DD734-FB7A-487D-8CE6-55E7AF9AEA7E} + ImageProcessor + + + + + + \ No newline at end of file diff --git a/src/ImageProcessor.Tests/RegularExpressionUnitTests.cs b/src/ImageProcessor.UnitTests/RegularExpressionUnitTests.cs similarity index 86% rename from src/ImageProcessor.Tests/RegularExpressionUnitTests.cs rename to src/ImageProcessor.UnitTests/RegularExpressionUnitTests.cs index 84e1d6c5b..280af264e 100644 --- a/src/ImageProcessor.Tests/RegularExpressionUnitTests.cs +++ b/src/ImageProcessor.UnitTests/RegularExpressionUnitTests.cs @@ -1,31 +1,18 @@ -// ----------------------------------------------------------------------- -// -// Copyright (c) James South. -// Licensed under the Apache License, Version 2.0. -// -// ----------------------------------------------------------------------- -namespace ImageProcessor.Tests +namespace ImageProcessor.UnitTests { - #region Using + using System; using System.Drawing; using ImageProcessor.Imaging; using ImageProcessor.Processors; - using Microsoft.VisualStudio.TestTools.UnitTesting; - #endregion - - /// - /// The regular expression unit tests. - /// This is a work in progress. YAWN! - /// - [TestClass] + using NUnit.Framework; + + [TestFixture ()] public class RegularExpressionUnitTests { - #region Regular Expression Tests - /// /// The alpha regex unit test. /// - [TestMethod] + [Test ()] public void TestAlphaRegex() { const string Querystring = "alpha=56"; @@ -42,7 +29,7 @@ namespace ImageProcessor.Tests /// /// The brightness regex unit test. /// - [TestMethod] + [Test ()] public void TestBrightnessRegex() { const string Querystring = "brightness=56"; @@ -59,7 +46,7 @@ namespace ImageProcessor.Tests /// /// The contrast regex unit test. /// - [TestMethod] + [Test ()] public void TestContrastRegex() { const string Querystring = "contrast=56"; @@ -76,7 +63,7 @@ namespace ImageProcessor.Tests /// /// The rotate regex unit test. /// - [TestMethod] + [Test ()] public void TestCropRegex() { const string Querystring = "crop=0,0,150,300"; @@ -92,7 +79,7 @@ namespace ImageProcessor.Tests /// /// The filter regex unit test. /// - [TestMethod] + [Test ()] public void TestFilterRegex() { // Should really write more for the other filters. @@ -110,7 +97,7 @@ namespace ImageProcessor.Tests /// /// The format regex unit test. /// - [TestMethod] + [Test ()] public void TestFormatRegex() { const string Querystring = "format=gif"; @@ -127,7 +114,7 @@ namespace ImageProcessor.Tests /// /// The quality regex unit test. /// - [TestMethod] + [Test ()] public void TestQualityRegex() { const string Querystring = "quality=56"; @@ -144,7 +131,7 @@ namespace ImageProcessor.Tests /// /// The resize regex unit test. /// - [TestMethod] + [Test ()] public void TestResizeRegex() { const string Querystring = "width=300"; @@ -161,7 +148,7 @@ namespace ImageProcessor.Tests /// /// The rotate regex unit test. /// - [TestMethod] + [Test ()] public void TestRotateRegex() { const string Querystring = "rotate=270"; @@ -178,7 +165,7 @@ namespace ImageProcessor.Tests /// /// The rounded corners regex unit test. /// - [TestMethod] + [Test ()] public void TestRoundedCornersRegex() { const string Querystring = "roundedcorners=30"; @@ -195,7 +182,7 @@ namespace ImageProcessor.Tests /// /// The rounded corners regex unit test. /// - [TestMethod] + [Test ()] public void TestTintRegex() { const string HexQuerystring = "tint=6aa6cc"; @@ -213,6 +200,6 @@ namespace ImageProcessor.Tests Color actualRgba = tint.DynamicParameter; Assert.AreEqual(expectedRgba, actualRgba); } - #endregion } } + diff --git a/src/ImageProcessor.UnitTests/packages.config b/src/ImageProcessor.UnitTests/packages.config new file mode 100644 index 000000000..5a3253fcb --- /dev/null +++ b/src/ImageProcessor.UnitTests/packages.config @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/src/packages/repositories.config b/src/packages/repositories.config index 458c0f4aa..73ccce20c 100644 --- a/src/packages/repositories.config +++ b/src/packages/repositories.config @@ -1,7 +1,8 @@ - - - - - - + + + + + + + \ No newline at end of file From 513c9aa7fe01edd13c3008749dbdc9942d53488f Mon Sep 17 00:00:00 2001 From: Thomas Broust Date: Wed, 25 Jun 2014 17:48:47 +0200 Subject: [PATCH 07/12] New unit tests project using NUnit instead of VS tests Former-commit-id: 51eb28260ca3cc6a2a1817dff69f2598628beea2 --- .gitignore | 3 + .../ImageProcessor.Tests.csproj | 112 ------------ .../Properties/AssemblyInfo.cs | 36 ---- src/ImageProcessor.Tests/app.config | 15 -- .../ImageProcessor.UnitTests.csproj | 52 ++++++ .../RegularExpressionUnitTests.cs | 47 ++--- src/ImageProcessor.UnitTests/packages.config | 4 + src/ImageProcessor.sln | 167 +++++++++--------- src/packages/repositories.config | 13 +- 9 files changed, 169 insertions(+), 280 deletions(-) delete mode 100644 src/ImageProcessor.Tests/ImageProcessor.Tests.csproj delete mode 100644 src/ImageProcessor.Tests/Properties/AssemblyInfo.cs delete mode 100644 src/ImageProcessor.Tests/app.config create mode 100644 src/ImageProcessor.UnitTests/ImageProcessor.UnitTests.csproj rename src/{ImageProcessor.Tests => ImageProcessor.UnitTests}/RegularExpressionUnitTests.cs (86%) create mode 100644 src/ImageProcessor.UnitTests/packages.config diff --git a/.gitignore b/.gitignore index 6b6928926..2fc43e4a1 100644 --- a/.gitignore +++ b/.gitignore @@ -64,6 +64,9 @@ local.properties .builds **/*.dotCover +# Xamarin +*.userprefs + ## TODO: If you have NuGet Package Restore enabled, uncomment this packages/ diff --git a/src/ImageProcessor.Tests/ImageProcessor.Tests.csproj b/src/ImageProcessor.Tests/ImageProcessor.Tests.csproj deleted file mode 100644 index 3d3e5c241..000000000 --- a/src/ImageProcessor.Tests/ImageProcessor.Tests.csproj +++ /dev/null @@ -1,112 +0,0 @@ - - - - Debug - AnyCPU - {39911A38-CA06-413C-80AA-39EF60CE984F} - Library - Properties - ImageProcessor.Tests - ImageProcessor.Tests - v4.5 - 512 - {3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - 10.0 - $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) - $(ProgramFiles)\Common Files\microsoft shared\VSTT\$(VisualStudioVersion)\UITestExtensionPackages - False - UnitTest - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - true - bin\x86\Debug\ - DEBUG;TRACE - full - x86 - prompt - MinimumRecommendedRules.ruleset - - - bin\x86\Release\ - TRACE - true - pdbonly - AnyCPU - prompt - MinimumRecommendedRules.ruleset - - - - - - - - - - - - - - - - - - - - - - - - - {3b5dd734-fb7a-487d-8ce6-55e7af9aea7e} - ImageProcessor - - - - - - - - - - False - - - False - - - False - - - False - - - - - - - - \ No newline at end of file diff --git a/src/ImageProcessor.Tests/Properties/AssemblyInfo.cs b/src/ImageProcessor.Tests/Properties/AssemblyInfo.cs deleted file mode 100644 index e2341f344..000000000 --- a/src/ImageProcessor.Tests/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,36 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("ImageProcessor.Tests")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("ImageProcessor.Tests")] -[assembly: AssemblyCopyright("Copyright © 2013")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("ab617b65-7259-4dc5-9dad-81a7c6537a4f")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/src/ImageProcessor.Tests/app.config b/src/ImageProcessor.Tests/app.config deleted file mode 100644 index 7d285c859..000000000 --- a/src/ImageProcessor.Tests/app.config +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/ImageProcessor.UnitTests/ImageProcessor.UnitTests.csproj b/src/ImageProcessor.UnitTests/ImageProcessor.UnitTests.csproj new file mode 100644 index 000000000..5552927ec --- /dev/null +++ b/src/ImageProcessor.UnitTests/ImageProcessor.UnitTests.csproj @@ -0,0 +1,52 @@ + + + + Debug + AnyCPU + {03CA9055-F997-428C-BF28-F50F991777C6} + Library + ImageProcessor.UnitTests + ImageProcessor.UnitTests + Client + + + true + full + false + bin\Debug + DEBUG; + prompt + 4 + false + + + full + true + bin\Release + prompt + 4 + false + + + + + + ..\packages\NUnit.2.6.3\lib\nunit.framework.dll + + + + + + + + + + + {3B5DD734-FB7A-487D-8CE6-55E7AF9AEA7E} + ImageProcessor + + + + + + \ No newline at end of file diff --git a/src/ImageProcessor.Tests/RegularExpressionUnitTests.cs b/src/ImageProcessor.UnitTests/RegularExpressionUnitTests.cs similarity index 86% rename from src/ImageProcessor.Tests/RegularExpressionUnitTests.cs rename to src/ImageProcessor.UnitTests/RegularExpressionUnitTests.cs index 84e1d6c5b..280af264e 100644 --- a/src/ImageProcessor.Tests/RegularExpressionUnitTests.cs +++ b/src/ImageProcessor.UnitTests/RegularExpressionUnitTests.cs @@ -1,31 +1,18 @@ -// ----------------------------------------------------------------------- -// -// Copyright (c) James South. -// Licensed under the Apache License, Version 2.0. -// -// ----------------------------------------------------------------------- -namespace ImageProcessor.Tests +namespace ImageProcessor.UnitTests { - #region Using + using System; using System.Drawing; using ImageProcessor.Imaging; using ImageProcessor.Processors; - using Microsoft.VisualStudio.TestTools.UnitTesting; - #endregion - - /// - /// The regular expression unit tests. - /// This is a work in progress. YAWN! - /// - [TestClass] + using NUnit.Framework; + + [TestFixture ()] public class RegularExpressionUnitTests { - #region Regular Expression Tests - /// /// The alpha regex unit test. /// - [TestMethod] + [Test ()] public void TestAlphaRegex() { const string Querystring = "alpha=56"; @@ -42,7 +29,7 @@ namespace ImageProcessor.Tests /// /// The brightness regex unit test. /// - [TestMethod] + [Test ()] public void TestBrightnessRegex() { const string Querystring = "brightness=56"; @@ -59,7 +46,7 @@ namespace ImageProcessor.Tests /// /// The contrast regex unit test. /// - [TestMethod] + [Test ()] public void TestContrastRegex() { const string Querystring = "contrast=56"; @@ -76,7 +63,7 @@ namespace ImageProcessor.Tests /// /// The rotate regex unit test. /// - [TestMethod] + [Test ()] public void TestCropRegex() { const string Querystring = "crop=0,0,150,300"; @@ -92,7 +79,7 @@ namespace ImageProcessor.Tests /// /// The filter regex unit test. /// - [TestMethod] + [Test ()] public void TestFilterRegex() { // Should really write more for the other filters. @@ -110,7 +97,7 @@ namespace ImageProcessor.Tests /// /// The format regex unit test. /// - [TestMethod] + [Test ()] public void TestFormatRegex() { const string Querystring = "format=gif"; @@ -127,7 +114,7 @@ namespace ImageProcessor.Tests /// /// The quality regex unit test. /// - [TestMethod] + [Test ()] public void TestQualityRegex() { const string Querystring = "quality=56"; @@ -144,7 +131,7 @@ namespace ImageProcessor.Tests /// /// The resize regex unit test. /// - [TestMethod] + [Test ()] public void TestResizeRegex() { const string Querystring = "width=300"; @@ -161,7 +148,7 @@ namespace ImageProcessor.Tests /// /// The rotate regex unit test. /// - [TestMethod] + [Test ()] public void TestRotateRegex() { const string Querystring = "rotate=270"; @@ -178,7 +165,7 @@ namespace ImageProcessor.Tests /// /// The rounded corners regex unit test. /// - [TestMethod] + [Test ()] public void TestRoundedCornersRegex() { const string Querystring = "roundedcorners=30"; @@ -195,7 +182,7 @@ namespace ImageProcessor.Tests /// /// The rounded corners regex unit test. /// - [TestMethod] + [Test ()] public void TestTintRegex() { const string HexQuerystring = "tint=6aa6cc"; @@ -213,6 +200,6 @@ namespace ImageProcessor.Tests Color actualRgba = tint.DynamicParameter; Assert.AreEqual(expectedRgba, actualRgba); } - #endregion } } + diff --git a/src/ImageProcessor.UnitTests/packages.config b/src/ImageProcessor.UnitTests/packages.config new file mode 100644 index 000000000..5a3253fcb --- /dev/null +++ b/src/ImageProcessor.UnitTests/packages.config @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/src/ImageProcessor.sln b/src/ImageProcessor.sln index a8060449d..186a446c7 100644 --- a/src/ImageProcessor.sln +++ b/src/ImageProcessor.sln @@ -1,6 +1,6 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 2013 +# Visual Studio 2012 VisualStudioVersion = 12.0.30110.0 MinimumVisualStudioVersion = 10.0.40219.1 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{C427A497-74DC-49B1-8420-D6E68354F29B}" @@ -18,8 +18,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".nuget", ".nuget", "{1E656C EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ImageProcessor", "ImageProcessor\ImageProcessor.csproj", "{3B5DD734-FB7A-487D-8CE6-55E7AF9AEA7E}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ImageProcessor.Tests", "ImageProcessor.Tests\ImageProcessor.Tests.csproj", "{39911A38-CA06-413C-80AA-39EF60CE984F}" -EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Web.Tests", "Web.Test\Web.Tests.csproj", "{23CE0FC0-9E59-4C93-A604-A4A98A6284D1}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Test_Website_MVC_NET4", "TestWebsites\NET4\Test_Website_MVC_NET4.csproj", "{30327C08-7574-4D7E-AC95-6A58753C6855}" @@ -34,6 +32,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Test_Website_Webforms_NET45 EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ImageProcessorConsole", "ImageProcessorConsole\ImageProcessorConsole.csproj", "{7BF5274B-56A7-4B62-8105-E9BDF25BAFE7}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ImageProcessor.UnitTests", "ImageProcessor.UnitTests\ImageProcessor.UnitTests.csproj", "{03CA9055-F997-428C-BF28-F50F991777C6}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution All|Any CPU = All|Any CPU @@ -47,39 +47,24 @@ Global Release|x86 = Release|x86 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {3B5DD734-FB7A-487D-8CE6-55E7AF9AEA7E}.All|Any CPU.ActiveCfg = All|Any CPU - {3B5DD734-FB7A-487D-8CE6-55E7AF9AEA7E}.All|Any CPU.Build.0 = All|Any CPU - {3B5DD734-FB7A-487D-8CE6-55E7AF9AEA7E}.All|Mixed Platforms.ActiveCfg = All|Any CPU - {3B5DD734-FB7A-487D-8CE6-55E7AF9AEA7E}.All|Mixed Platforms.Build.0 = All|Any CPU - {3B5DD734-FB7A-487D-8CE6-55E7AF9AEA7E}.All|x86.ActiveCfg = All|Any CPU - {3B5DD734-FB7A-487D-8CE6-55E7AF9AEA7E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {3B5DD734-FB7A-487D-8CE6-55E7AF9AEA7E}.Debug|Any CPU.Build.0 = Debug|Any CPU - {3B5DD734-FB7A-487D-8CE6-55E7AF9AEA7E}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU - {3B5DD734-FB7A-487D-8CE6-55E7AF9AEA7E}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU - {3B5DD734-FB7A-487D-8CE6-55E7AF9AEA7E}.Debug|x86.ActiveCfg = Debug|Any CPU - {3B5DD734-FB7A-487D-8CE6-55E7AF9AEA7E}.Release|Any CPU.ActiveCfg = Release|Any CPU - {3B5DD734-FB7A-487D-8CE6-55E7AF9AEA7E}.Release|Any CPU.Build.0 = Release|Any CPU - {3B5DD734-FB7A-487D-8CE6-55E7AF9AEA7E}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU - {3B5DD734-FB7A-487D-8CE6-55E7AF9AEA7E}.Release|Mixed Platforms.Build.0 = Release|Any CPU - {3B5DD734-FB7A-487D-8CE6-55E7AF9AEA7E}.Release|x86.ActiveCfg = Release|Any CPU - {39911A38-CA06-413C-80AA-39EF60CE984F}.All|Any CPU.ActiveCfg = Release|Any CPU - {39911A38-CA06-413C-80AA-39EF60CE984F}.All|Any CPU.Build.0 = Release|Any CPU - {39911A38-CA06-413C-80AA-39EF60CE984F}.All|Mixed Platforms.ActiveCfg = Release|x86 - {39911A38-CA06-413C-80AA-39EF60CE984F}.All|Mixed Platforms.Build.0 = Release|x86 - {39911A38-CA06-413C-80AA-39EF60CE984F}.All|x86.ActiveCfg = Release|x86 - {39911A38-CA06-413C-80AA-39EF60CE984F}.All|x86.Build.0 = Release|x86 - {39911A38-CA06-413C-80AA-39EF60CE984F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {39911A38-CA06-413C-80AA-39EF60CE984F}.Debug|Any CPU.Build.0 = Debug|Any CPU - {39911A38-CA06-413C-80AA-39EF60CE984F}.Debug|Mixed Platforms.ActiveCfg = Debug|x86 - {39911A38-CA06-413C-80AA-39EF60CE984F}.Debug|Mixed Platforms.Build.0 = Debug|x86 - {39911A38-CA06-413C-80AA-39EF60CE984F}.Debug|x86.ActiveCfg = Debug|x86 - {39911A38-CA06-413C-80AA-39EF60CE984F}.Debug|x86.Build.0 = Debug|x86 - {39911A38-CA06-413C-80AA-39EF60CE984F}.Release|Any CPU.ActiveCfg = Release|Any CPU - {39911A38-CA06-413C-80AA-39EF60CE984F}.Release|Any CPU.Build.0 = Release|Any CPU - {39911A38-CA06-413C-80AA-39EF60CE984F}.Release|Mixed Platforms.ActiveCfg = Release|x86 - {39911A38-CA06-413C-80AA-39EF60CE984F}.Release|Mixed Platforms.Build.0 = Release|x86 - {39911A38-CA06-413C-80AA-39EF60CE984F}.Release|x86.ActiveCfg = Release|x86 - {39911A38-CA06-413C-80AA-39EF60CE984F}.Release|x86.Build.0 = Release|x86 + {03CA9055-F997-428C-BF28-F50F991777C6}.All|Any CPU.ActiveCfg = Debug|Any CPU + {03CA9055-F997-428C-BF28-F50F991777C6}.All|Any CPU.Build.0 = Debug|Any CPU + {03CA9055-F997-428C-BF28-F50F991777C6}.All|Mixed Platforms.ActiveCfg = Debug|Any CPU + {03CA9055-F997-428C-BF28-F50F991777C6}.All|Mixed Platforms.Build.0 = Debug|Any CPU + {03CA9055-F997-428C-BF28-F50F991777C6}.All|x86.ActiveCfg = Debug|Any CPU + {03CA9055-F997-428C-BF28-F50F991777C6}.All|x86.Build.0 = Debug|Any CPU + {03CA9055-F997-428C-BF28-F50F991777C6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {03CA9055-F997-428C-BF28-F50F991777C6}.Debug|Any CPU.Build.0 = Debug|Any CPU + {03CA9055-F997-428C-BF28-F50F991777C6}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU + {03CA9055-F997-428C-BF28-F50F991777C6}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU + {03CA9055-F997-428C-BF28-F50F991777C6}.Debug|x86.ActiveCfg = Debug|Any CPU + {03CA9055-F997-428C-BF28-F50F991777C6}.Debug|x86.Build.0 = Debug|Any CPU + {03CA9055-F997-428C-BF28-F50F991777C6}.Release|Any CPU.ActiveCfg = Release|Any CPU + {03CA9055-F997-428C-BF28-F50F991777C6}.Release|Any CPU.Build.0 = Release|Any CPU + {03CA9055-F997-428C-BF28-F50F991777C6}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU + {03CA9055-F997-428C-BF28-F50F991777C6}.Release|Mixed Platforms.Build.0 = Release|Any CPU + {03CA9055-F997-428C-BF28-F50F991777C6}.Release|x86.ActiveCfg = Release|Any CPU + {03CA9055-F997-428C-BF28-F50F991777C6}.Release|x86.Build.0 = Release|Any CPU {23CE0FC0-9E59-4C93-A604-A4A98A6284D1}.All|Any CPU.ActiveCfg = Release|Any CPU {23CE0FC0-9E59-4C93-A604-A4A98A6284D1}.All|Any CPU.Build.0 = Release|Any CPU {23CE0FC0-9E59-4C93-A604-A4A98A6284D1}.All|Mixed Platforms.ActiveCfg = Release|Any CPU @@ -112,21 +97,21 @@ Global {30327C08-7574-4D7E-AC95-6A58753C6855}.Release|Mixed Platforms.Build.0 = Release|x86 {30327C08-7574-4D7E-AC95-6A58753C6855}.Release|x86.ActiveCfg = Release|x86 {30327C08-7574-4D7E-AC95-6A58753C6855}.Release|x86.Build.0 = Release|x86 - {F6A208E9-C18F-43E9-B051-3C6EED30FDAF}.All|Any CPU.ActiveCfg = Release|Any CPU - {F6A208E9-C18F-43E9-B051-3C6EED30FDAF}.All|Any CPU.Build.0 = Release|Any CPU - {F6A208E9-C18F-43E9-B051-3C6EED30FDAF}.All|Mixed Platforms.ActiveCfg = Release|Any CPU - {F6A208E9-C18F-43E9-B051-3C6EED30FDAF}.All|Mixed Platforms.Build.0 = Release|Any CPU - {F6A208E9-C18F-43E9-B051-3C6EED30FDAF}.All|x86.ActiveCfg = Release|Any CPU - {F6A208E9-C18F-43E9-B051-3C6EED30FDAF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {F6A208E9-C18F-43E9-B051-3C6EED30FDAF}.Debug|Any CPU.Build.0 = Debug|Any CPU - {F6A208E9-C18F-43E9-B051-3C6EED30FDAF}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU - {F6A208E9-C18F-43E9-B051-3C6EED30FDAF}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU - {F6A208E9-C18F-43E9-B051-3C6EED30FDAF}.Debug|x86.ActiveCfg = Debug|Any CPU - {F6A208E9-C18F-43E9-B051-3C6EED30FDAF}.Release|Any CPU.ActiveCfg = Release|Any CPU - {F6A208E9-C18F-43E9-B051-3C6EED30FDAF}.Release|Any CPU.Build.0 = Release|Any CPU - {F6A208E9-C18F-43E9-B051-3C6EED30FDAF}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU - {F6A208E9-C18F-43E9-B051-3C6EED30FDAF}.Release|Mixed Platforms.Build.0 = Release|Any CPU - {F6A208E9-C18F-43E9-B051-3C6EED30FDAF}.Release|x86.ActiveCfg = Release|Any CPU + {3B5DD734-FB7A-487D-8CE6-55E7AF9AEA7E}.All|Any CPU.ActiveCfg = All|Any CPU + {3B5DD734-FB7A-487D-8CE6-55E7AF9AEA7E}.All|Any CPU.Build.0 = All|Any CPU + {3B5DD734-FB7A-487D-8CE6-55E7AF9AEA7E}.All|Mixed Platforms.ActiveCfg = All|Any CPU + {3B5DD734-FB7A-487D-8CE6-55E7AF9AEA7E}.All|Mixed Platforms.Build.0 = All|Any CPU + {3B5DD734-FB7A-487D-8CE6-55E7AF9AEA7E}.All|x86.ActiveCfg = All|Any CPU + {3B5DD734-FB7A-487D-8CE6-55E7AF9AEA7E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {3B5DD734-FB7A-487D-8CE6-55E7AF9AEA7E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {3B5DD734-FB7A-487D-8CE6-55E7AF9AEA7E}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU + {3B5DD734-FB7A-487D-8CE6-55E7AF9AEA7E}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU + {3B5DD734-FB7A-487D-8CE6-55E7AF9AEA7E}.Debug|x86.ActiveCfg = Debug|Any CPU + {3B5DD734-FB7A-487D-8CE6-55E7AF9AEA7E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {3B5DD734-FB7A-487D-8CE6-55E7AF9AEA7E}.Release|Any CPU.Build.0 = Release|Any CPU + {3B5DD734-FB7A-487D-8CE6-55E7AF9AEA7E}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU + {3B5DD734-FB7A-487D-8CE6-55E7AF9AEA7E}.Release|Mixed Platforms.Build.0 = Release|Any CPU + {3B5DD734-FB7A-487D-8CE6-55E7AF9AEA7E}.Release|x86.ActiveCfg = Release|Any CPU {4F7050F2-465F-4E10-8DB2-2FB97AC6AA43}.All|Any CPU.ActiveCfg = All|Any CPU {4F7050F2-465F-4E10-8DB2-2FB97AC6AA43}.All|Any CPU.Build.0 = All|Any CPU {4F7050F2-465F-4E10-8DB2-2FB97AC6AA43}.All|Mixed Platforms.ActiveCfg = All|Any CPU @@ -142,36 +127,6 @@ Global {4F7050F2-465F-4E10-8DB2-2FB97AC6AA43}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU {4F7050F2-465F-4E10-8DB2-2FB97AC6AA43}.Release|Mixed Platforms.Build.0 = Release|Any CPU {4F7050F2-465F-4E10-8DB2-2FB97AC6AA43}.Release|x86.ActiveCfg = Release|Any CPU - {D011A778-59C8-4BFA-A770-C350216BF161}.All|Any CPU.ActiveCfg = Release|Any CPU - {D011A778-59C8-4BFA-A770-C350216BF161}.All|Any CPU.Build.0 = Release|Any CPU - {D011A778-59C8-4BFA-A770-C350216BF161}.All|Mixed Platforms.ActiveCfg = Release|Any CPU - {D011A778-59C8-4BFA-A770-C350216BF161}.All|Mixed Platforms.Build.0 = Release|Any CPU - {D011A778-59C8-4BFA-A770-C350216BF161}.All|x86.ActiveCfg = Release|Any CPU - {D011A778-59C8-4BFA-A770-C350216BF161}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {D011A778-59C8-4BFA-A770-C350216BF161}.Debug|Any CPU.Build.0 = Debug|Any CPU - {D011A778-59C8-4BFA-A770-C350216BF161}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU - {D011A778-59C8-4BFA-A770-C350216BF161}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU - {D011A778-59C8-4BFA-A770-C350216BF161}.Debug|x86.ActiveCfg = Debug|Any CPU - {D011A778-59C8-4BFA-A770-C350216BF161}.Release|Any CPU.ActiveCfg = Release|Any CPU - {D011A778-59C8-4BFA-A770-C350216BF161}.Release|Any CPU.Build.0 = Release|Any CPU - {D011A778-59C8-4BFA-A770-C350216BF161}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU - {D011A778-59C8-4BFA-A770-C350216BF161}.Release|Mixed Platforms.Build.0 = Release|Any CPU - {D011A778-59C8-4BFA-A770-C350216BF161}.Release|x86.ActiveCfg = Release|Any CPU - {8DA47D8C-DB1A-4D82-843F-896AB9C3B3D2}.All|Any CPU.ActiveCfg = Release|Any CPU - {8DA47D8C-DB1A-4D82-843F-896AB9C3B3D2}.All|Any CPU.Build.0 = Release|Any CPU - {8DA47D8C-DB1A-4D82-843F-896AB9C3B3D2}.All|Mixed Platforms.ActiveCfg = Release|Any CPU - {8DA47D8C-DB1A-4D82-843F-896AB9C3B3D2}.All|Mixed Platforms.Build.0 = Release|Any CPU - {8DA47D8C-DB1A-4D82-843F-896AB9C3B3D2}.All|x86.ActiveCfg = Release|Any CPU - {8DA47D8C-DB1A-4D82-843F-896AB9C3B3D2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {8DA47D8C-DB1A-4D82-843F-896AB9C3B3D2}.Debug|Any CPU.Build.0 = Debug|Any CPU - {8DA47D8C-DB1A-4D82-843F-896AB9C3B3D2}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU - {8DA47D8C-DB1A-4D82-843F-896AB9C3B3D2}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU - {8DA47D8C-DB1A-4D82-843F-896AB9C3B3D2}.Debug|x86.ActiveCfg = Debug|Any CPU - {8DA47D8C-DB1A-4D82-843F-896AB9C3B3D2}.Release|Any CPU.ActiveCfg = Release|Any CPU - {8DA47D8C-DB1A-4D82-843F-896AB9C3B3D2}.Release|Any CPU.Build.0 = Release|Any CPU - {8DA47D8C-DB1A-4D82-843F-896AB9C3B3D2}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU - {8DA47D8C-DB1A-4D82-843F-896AB9C3B3D2}.Release|Mixed Platforms.Build.0 = Release|Any CPU - {8DA47D8C-DB1A-4D82-843F-896AB9C3B3D2}.Release|x86.ActiveCfg = Release|Any CPU {7BF5274B-56A7-4B62-8105-E9BDF25BAFE7}.All|Any CPU.ActiveCfg = Release|Any CPU {7BF5274B-56A7-4B62-8105-E9BDF25BAFE7}.All|Any CPU.Build.0 = Release|Any CPU {7BF5274B-56A7-4B62-8105-E9BDF25BAFE7}.All|Mixed Platforms.ActiveCfg = Release|Any CPU @@ -187,6 +142,56 @@ Global {7BF5274B-56A7-4B62-8105-E9BDF25BAFE7}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU {7BF5274B-56A7-4B62-8105-E9BDF25BAFE7}.Release|Mixed Platforms.Build.0 = Release|Any CPU {7BF5274B-56A7-4B62-8105-E9BDF25BAFE7}.Release|x86.ActiveCfg = Release|Any CPU + {8DA47D8C-DB1A-4D82-843F-896AB9C3B3D2}.All|Any CPU.ActiveCfg = Release|Any CPU + {8DA47D8C-DB1A-4D82-843F-896AB9C3B3D2}.All|Any CPU.Build.0 = Release|Any CPU + {8DA47D8C-DB1A-4D82-843F-896AB9C3B3D2}.All|Mixed Platforms.ActiveCfg = Release|Any CPU + {8DA47D8C-DB1A-4D82-843F-896AB9C3B3D2}.All|Mixed Platforms.Build.0 = Release|Any CPU + {8DA47D8C-DB1A-4D82-843F-896AB9C3B3D2}.All|x86.ActiveCfg = Release|Any CPU + {8DA47D8C-DB1A-4D82-843F-896AB9C3B3D2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {8DA47D8C-DB1A-4D82-843F-896AB9C3B3D2}.Debug|Any CPU.Build.0 = Debug|Any CPU + {8DA47D8C-DB1A-4D82-843F-896AB9C3B3D2}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU + {8DA47D8C-DB1A-4D82-843F-896AB9C3B3D2}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU + {8DA47D8C-DB1A-4D82-843F-896AB9C3B3D2}.Debug|x86.ActiveCfg = Debug|Any CPU + {8DA47D8C-DB1A-4D82-843F-896AB9C3B3D2}.Release|Any CPU.ActiveCfg = Release|Any CPU + {8DA47D8C-DB1A-4D82-843F-896AB9C3B3D2}.Release|Any CPU.Build.0 = Release|Any CPU + {8DA47D8C-DB1A-4D82-843F-896AB9C3B3D2}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU + {8DA47D8C-DB1A-4D82-843F-896AB9C3B3D2}.Release|Mixed Platforms.Build.0 = Release|Any CPU + {8DA47D8C-DB1A-4D82-843F-896AB9C3B3D2}.Release|x86.ActiveCfg = Release|Any CPU + {D011A778-59C8-4BFA-A770-C350216BF161}.All|Any CPU.ActiveCfg = Release|Any CPU + {D011A778-59C8-4BFA-A770-C350216BF161}.All|Any CPU.Build.0 = Release|Any CPU + {D011A778-59C8-4BFA-A770-C350216BF161}.All|Mixed Platforms.ActiveCfg = Release|Any CPU + {D011A778-59C8-4BFA-A770-C350216BF161}.All|Mixed Platforms.Build.0 = Release|Any CPU + {D011A778-59C8-4BFA-A770-C350216BF161}.All|x86.ActiveCfg = Release|Any CPU + {D011A778-59C8-4BFA-A770-C350216BF161}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D011A778-59C8-4BFA-A770-C350216BF161}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D011A778-59C8-4BFA-A770-C350216BF161}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU + {D011A778-59C8-4BFA-A770-C350216BF161}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU + {D011A778-59C8-4BFA-A770-C350216BF161}.Debug|x86.ActiveCfg = Debug|Any CPU + {D011A778-59C8-4BFA-A770-C350216BF161}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D011A778-59C8-4BFA-A770-C350216BF161}.Release|Any CPU.Build.0 = Release|Any CPU + {D011A778-59C8-4BFA-A770-C350216BF161}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU + {D011A778-59C8-4BFA-A770-C350216BF161}.Release|Mixed Platforms.Build.0 = Release|Any CPU + {D011A778-59C8-4BFA-A770-C350216BF161}.Release|x86.ActiveCfg = Release|Any CPU + {F6A208E9-C18F-43E9-B051-3C6EED30FDAF}.All|Any CPU.ActiveCfg = Release|Any CPU + {F6A208E9-C18F-43E9-B051-3C6EED30FDAF}.All|Any CPU.Build.0 = Release|Any CPU + {F6A208E9-C18F-43E9-B051-3C6EED30FDAF}.All|Mixed Platforms.ActiveCfg = Release|Any CPU + {F6A208E9-C18F-43E9-B051-3C6EED30FDAF}.All|Mixed Platforms.Build.0 = Release|Any CPU + {F6A208E9-C18F-43E9-B051-3C6EED30FDAF}.All|x86.ActiveCfg = Release|Any CPU + {F6A208E9-C18F-43E9-B051-3C6EED30FDAF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F6A208E9-C18F-43E9-B051-3C6EED30FDAF}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F6A208E9-C18F-43E9-B051-3C6EED30FDAF}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU + {F6A208E9-C18F-43E9-B051-3C6EED30FDAF}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU + {F6A208E9-C18F-43E9-B051-3C6EED30FDAF}.Debug|x86.ActiveCfg = Debug|Any CPU + {F6A208E9-C18F-43E9-B051-3C6EED30FDAF}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F6A208E9-C18F-43E9-B051-3C6EED30FDAF}.Release|Any CPU.Build.0 = Release|Any CPU + {F6A208E9-C18F-43E9-B051-3C6EED30FDAF}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU + {F6A208E9-C18F-43E9-B051-3C6EED30FDAF}.Release|Mixed Platforms.Build.0 = Release|Any CPU + {F6A208E9-C18F-43E9-B051-3C6EED30FDAF}.Release|x86.ActiveCfg = Release|Any CPU + EndGlobalSection + GlobalSection(NestedProjects) = preSolution + EndGlobalSection + GlobalSection(MonoDevelopProperties) = preSolution + StartupItem = ImageProcessorConsole\ImageProcessorConsole.csproj EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/src/packages/repositories.config b/src/packages/repositories.config index 458c0f4aa..73ccce20c 100644 --- a/src/packages/repositories.config +++ b/src/packages/repositories.config @@ -1,7 +1,8 @@ - - - - - - + + + + + + + \ No newline at end of file From e5a7019675e82118bcd522b7470daac1048b6825 Mon Sep 17 00:00:00 2001 From: Thomas Broust Date: Wed, 25 Jun 2014 21:59:11 +0200 Subject: [PATCH 08/12] Changes target framework of console project to .Net 4 Former-commit-id: c0489c25c1d37e5e3745276bdef590541ddb9f0a --- src/ImageProcessorConsole/ImageProcessorConsole.csproj | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/ImageProcessorConsole/ImageProcessorConsole.csproj b/src/ImageProcessorConsole/ImageProcessorConsole.csproj index 39b66751b..09423698e 100644 --- a/src/ImageProcessorConsole/ImageProcessorConsole.csproj +++ b/src/ImageProcessorConsole/ImageProcessorConsole.csproj @@ -1,5 +1,5 @@  - + Debug @@ -9,9 +9,9 @@ Properties ImageProcessorConsole ImageProcessorConsole - v4.5.1 512 true + Client AnyCPU @@ -51,7 +51,7 @@ - {3b5dd734-fb7a-487d-8ce6-55e7af9aea7e} + {3B5DD734-FB7A-487D-8CE6-55E7AF9AEA7E} ImageProcessor From dee47440c9a8bb5814eae0d65ed6952665b537f0 Mon Sep 17 00:00:00 2001 From: Thomas Broust Date: Wed, 25 Jun 2014 22:48:16 +0200 Subject: [PATCH 09/12] Stylecop all the things! Former-commit-id: ff6d069372a9627856a3afc06b581eac8fd24f56 --- .../ImageFactoryUnitTests.cs | 15 +++++++ .../RegularExpressionUnitTests.cs | 42 ++++++++++++------- 2 files changed, 42 insertions(+), 15 deletions(-) create mode 100644 src/ImageProcessor.UnitTests/ImageFactoryUnitTests.cs diff --git a/src/ImageProcessor.UnitTests/ImageFactoryUnitTests.cs b/src/ImageProcessor.UnitTests/ImageFactoryUnitTests.cs new file mode 100644 index 000000000..12076b975 --- /dev/null +++ b/src/ImageProcessor.UnitTests/ImageFactoryUnitTests.cs @@ -0,0 +1,15 @@ +using NUnit.Framework; +using System; + +namespace ImageProcessor.UnitTests +{ + [TestFixture()] + public class ImageFactoryUnitTests + { + [Test()] + public void TestCase() + { + } + } +} + diff --git a/src/ImageProcessor.UnitTests/RegularExpressionUnitTests.cs b/src/ImageProcessor.UnitTests/RegularExpressionUnitTests.cs index 280af264e..fcd45df4a 100644 --- a/src/ImageProcessor.UnitTests/RegularExpressionUnitTests.cs +++ b/src/ImageProcessor.UnitTests/RegularExpressionUnitTests.cs @@ -1,4 +1,14 @@ -namespace ImageProcessor.UnitTests +// -------------------------------------------------------------------------------------------------------------------- +// +// Copyright (c) James South. +// Licensed under the Apache License, Version 2.0. +// +// +// Unit tests for the ImageProcessor regular expressions +// +// -------------------------------------------------------------------------------------------------------------------- + +namespace ImageProcessor.UnitTests { using System; using System.Drawing; @@ -6,13 +16,16 @@ using ImageProcessor.Processors; using NUnit.Framework; - [TestFixture ()] + /// + /// Test harness for the regular expressions + /// + [TestFixture] public class RegularExpressionUnitTests { /// /// The alpha regex unit test. /// - [Test ()] + [Test] public void TestAlphaRegex() { const string Querystring = "alpha=56"; @@ -29,7 +42,7 @@ /// /// The brightness regex unit test. /// - [Test ()] + [Test] public void TestBrightnessRegex() { const string Querystring = "brightness=56"; @@ -46,7 +59,7 @@ /// /// The contrast regex unit test. /// - [Test ()] + [Test] public void TestContrastRegex() { const string Querystring = "contrast=56"; @@ -63,7 +76,7 @@ /// /// The rotate regex unit test. /// - [Test ()] + [Test] public void TestCropRegex() { const string Querystring = "crop=0,0,150,300"; @@ -79,7 +92,7 @@ /// /// The filter regex unit test. /// - [Test ()] + [Test] public void TestFilterRegex() { // Should really write more for the other filters. @@ -97,7 +110,7 @@ /// /// The format regex unit test. /// - [Test ()] + [Test] public void TestFormatRegex() { const string Querystring = "format=gif"; @@ -114,7 +127,7 @@ /// /// The quality regex unit test. /// - [Test ()] + [Test] public void TestQualityRegex() { const string Querystring = "quality=56"; @@ -131,7 +144,7 @@ /// /// The resize regex unit test. /// - [Test ()] + [Test] public void TestResizeRegex() { const string Querystring = "width=300"; @@ -148,7 +161,7 @@ /// /// The rotate regex unit test. /// - [Test ()] + [Test] public void TestRotateRegex() { const string Querystring = "rotate=270"; @@ -165,7 +178,7 @@ /// /// The rounded corners regex unit test. /// - [Test ()] + [Test] public void TestRoundedCornersRegex() { const string Querystring = "roundedcorners=30"; @@ -182,7 +195,7 @@ /// /// The rounded corners regex unit test. /// - [Test ()] + [Test] public void TestTintRegex() { const string HexQuerystring = "tint=6aa6cc"; @@ -201,5 +214,4 @@ Assert.AreEqual(expectedRgba, actualRgba); } } -} - +} \ No newline at end of file From 9961e191389e3a66c38089871d799707deae39b0 Mon Sep 17 00:00:00 2001 From: Thomas Broust Date: Wed, 25 Jun 2014 23:26:59 +0200 Subject: [PATCH 10/12] Creates a new simple test class for image loading Former-commit-id: 8add7ad0e49c1fdcf5da9090e6de2d7546b63d52 --- .../ImageFactoryUnitTests.cs | 42 +++++-- .../ImageProcessor.UnitTests.csproj | 116 ++++++++++++++++++ 2 files changed, 151 insertions(+), 7 deletions(-) diff --git a/src/ImageProcessor.UnitTests/ImageFactoryUnitTests.cs b/src/ImageProcessor.UnitTests/ImageFactoryUnitTests.cs index 12076b975..ef5b9e0c8 100644 --- a/src/ImageProcessor.UnitTests/ImageFactoryUnitTests.cs +++ b/src/ImageProcessor.UnitTests/ImageFactoryUnitTests.cs @@ -1,15 +1,43 @@ -using NUnit.Framework; -using System; +// -------------------------------------------------------------------------------------------------------------------- +// +// Copyright (c) James South. +// Licensed under the Apache License, Version 2.0. +// +// +// Unit tests for the ImageFactory (loading of images) +// +// -------------------------------------------------------------------------------------------------------------------- namespace ImageProcessor.UnitTests { - [TestFixture()] + using System; + using System.IO; + using NUnit.Framework; + + /// + /// Test harness for the image factory + /// + [TestFixture] public class ImageFactoryUnitTests { - [Test()] - public void TestCase() + /// + /// The path to the binary's folder + /// + private readonly string localPath = Path.GetDirectoryName(new Uri(System.Reflection.Assembly.GetExecutingAssembly().CodeBase).LocalPath); + + /// + /// Tests the loading of image from a file + /// + [Test] + public void TestLoadImageFromFile() { + var testPhoto = Path.Combine(this.localPath, "Images/Chrysanthemum.jpg"); + using (ImageFactory imageFactory = new ImageFactory()) + { + imageFactory.Load(testPhoto); + Assert.AreEqual(testPhoto, imageFactory.ImagePath); + Assert.AreEqual("image/jpeg", imageFactory.MimeType); + } } } -} - +} \ No newline at end of file diff --git a/src/ImageProcessor.UnitTests/ImageProcessor.UnitTests.csproj b/src/ImageProcessor.UnitTests/ImageProcessor.UnitTests.csproj index 5552927ec..c9d6a7da8 100644 --- a/src/ImageProcessor.UnitTests/ImageProcessor.UnitTests.csproj +++ b/src/ImageProcessor.UnitTests/ImageProcessor.UnitTests.csproj @@ -38,6 +38,7 @@ + @@ -48,5 +49,120 @@ + + Images\Chrysanthemum.jpg + PreserveNewest + + + Images\Desert.jpg + PreserveNewest + + + Images\Hydrangeas.jpg + PreserveNewest + + + Images\Jellyfish.jpg + PreserveNewest + + + Images\Koala.jpg + PreserveNewest + + + Images\Lighthouse.jpg + PreserveNewest + + + Images\Penguins-200.jpg + PreserveNewest + + + Images\Penguins-8.png + PreserveNewest + + + Images\Penguins.bmp + PreserveNewest + + + Images\Penguins.gif + PreserveNewest + + + Images\Penguins.jpg + PreserveNewest + + + Images\Penguins.png + PreserveNewest + + + Images\Penguins.tif + PreserveNewest + + + Images\Tulips.jpg + PreserveNewest + + + Images\bus.jpg + PreserveNewest + + + Images\cmyk.jpg + PreserveNewest + + + Images\cmyk.png + PreserveNewest + + + Images\jrt.jpg + PreserveNewest + + + Images\meter.gif + PreserveNewest + + + Images\rocks.jpg + PreserveNewest + + + Images\rotate.jpg + PreserveNewest + + + Images\sample1.jpg + PreserveNewest + + + Images\srgb.jpg + PreserveNewest + + + Images\srgb.png + PreserveNewest + + + Images\text.png + PreserveNewest + + + Images\thor.jpg + PreserveNewest + + + Images\udendørs-374.jpg + PreserveNewest + + + Images\udendørs.jpg + PreserveNewest + + + + \ No newline at end of file From f3a239068477e15fdd7b7e4ce069d111143bf76c Mon Sep 17 00:00:00 2001 From: Thomas Broust Date: Wed, 25 Jun 2014 23:32:41 +0200 Subject: [PATCH 11/12] Tests multiple images using test cases Former-commit-id: 4505510f99fc7aa8cd8dba5a963e914a790ad3dd --- .../ImageFactoryUnitTests.cs | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/ImageProcessor.UnitTests/ImageFactoryUnitTests.cs b/src/ImageProcessor.UnitTests/ImageFactoryUnitTests.cs index ef5b9e0c8..ccbad8b4e 100644 --- a/src/ImageProcessor.UnitTests/ImageFactoryUnitTests.cs +++ b/src/ImageProcessor.UnitTests/ImageFactoryUnitTests.cs @@ -29,14 +29,20 @@ namespace ImageProcessor.UnitTests /// Tests the loading of image from a file /// [Test] - public void TestLoadImageFromFile() + [TestCase("Chrysanthemum.jpg", "image/jpeg")] + [TestCase("Desert.jpg", "image/jpeg")] + [TestCase("cmyk.png", "image/png")] + [TestCase("Penguins.bmp", "image/bmp")] + [TestCase("Penguins.gif", "image/gif")] + public void TestLoadImageFromFile(string fileName, string expectedMime) { - var testPhoto = Path.Combine(this.localPath, "Images/Chrysanthemum.jpg"); + var testPhoto = Path.Combine(this.localPath, string.Format("Images/{0}", fileName)); using (ImageFactory imageFactory = new ImageFactory()) { imageFactory.Load(testPhoto); Assert.AreEqual(testPhoto, imageFactory.ImagePath); - Assert.AreEqual("image/jpeg", imageFactory.MimeType); + Assert.AreEqual(expectedMime, imageFactory.MimeType); + Assert.IsNotNull(imageFactory.Image); } } } From 35ea2e359c4f5e9f4fb36459ef55d88916d3ecc2 Mon Sep 17 00:00:00 2001 From: Thomas Broust Date: Thu, 26 Jun 2014 00:22:35 +0200 Subject: [PATCH 12/12] Cleanup of XML documentation - cref is for classes Former-commit-id: 01ddc649041696977417260eed55d8268c123633 --- src/ImageProcessor/Extensions/ImageInfo.cs | 2 +- src/ImageProcessor/Imaging/ExifPropertyTag.cs | 2 +- src/ImageProcessor/Imaging/ExifPropertyTagType.cs | 2 +- src/ImageProcessor/Imaging/GifEncoder.cs | 2 +- src/ImageProcessor/Processors/Alpha.cs | 2 +- src/ImageProcessor/Processors/Brightness.cs | 2 +- src/ImageProcessor/Processors/Contrast.cs | 2 +- src/ImageProcessor/Processors/Crop.cs | 2 +- src/ImageProcessor/Processors/Flip.cs | 2 +- src/ImageProcessor/Processors/Rotate.cs | 2 +- src/ImageProcessor/Processors/Saturation.cs | 4 ++-- 11 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/ImageProcessor/Extensions/ImageInfo.cs b/src/ImageProcessor/Extensions/ImageInfo.cs index 720eb5a20..ebb55c631 100644 --- a/src/ImageProcessor/Extensions/ImageInfo.cs +++ b/src/ImageProcessor/Extensions/ImageInfo.cs @@ -16,7 +16,7 @@ namespace ImageProcessor.Extensions /// /// Provides information about an image. - /// + /// /// public class ImageInfo { diff --git a/src/ImageProcessor/Imaging/ExifPropertyTag.cs b/src/ImageProcessor/Imaging/ExifPropertyTag.cs index 3af48741d..3e714d03c 100644 --- a/src/ImageProcessor/Imaging/ExifPropertyTag.cs +++ b/src/ImageProcessor/Imaging/ExifPropertyTag.cs @@ -12,7 +12,7 @@ namespace ImageProcessor.Imaging { /// /// The following enum gives descriptions of the property items supported by Windows GDI+. - /// + /// /// TODO: Add more XML descriptions. /// public enum ExifPropertyTag diff --git a/src/ImageProcessor/Imaging/ExifPropertyTagType.cs b/src/ImageProcessor/Imaging/ExifPropertyTagType.cs index 2c3a1b352..63f9bc3a4 100644 --- a/src/ImageProcessor/Imaging/ExifPropertyTagType.cs +++ b/src/ImageProcessor/Imaging/ExifPropertyTagType.cs @@ -13,7 +13,7 @@ namespace ImageProcessor.Imaging { /// /// Specifies the data type of the values stored in the value data member of that same PropertyItem object. - /// + /// /// public enum ExifPropertyTagType : short { diff --git a/src/ImageProcessor/Imaging/GifEncoder.cs b/src/ImageProcessor/Imaging/GifEncoder.cs index 20a8ba0f0..442b0a2d7 100644 --- a/src/ImageProcessor/Imaging/GifEncoder.cs +++ b/src/ImageProcessor/Imaging/GifEncoder.cs @@ -29,7 +29,7 @@ namespace ImageProcessor.Imaging /// Always wire this up in a using block. /// Disposing the encoder will complete the file. /// Uses default .NET GIF encoding and adds animation headers. - /// Adapted from + /// Adapted from /// /// public class GifEncoder : IDisposable diff --git a/src/ImageProcessor/Processors/Alpha.cs b/src/ImageProcessor/Processors/Alpha.cs index 70ff57a65..61463a6ab 100644 --- a/src/ImageProcessor/Processors/Alpha.cs +++ b/src/ImageProcessor/Processors/Alpha.cs @@ -25,7 +25,7 @@ namespace ImageProcessor.Processors { /// /// The regular expression to search strings for. - /// + /// /// private static readonly Regex QueryRegex = new Regex(@"alpha=(?:100|[1-9]?[0-9])", RegexOptions.Compiled); diff --git a/src/ImageProcessor/Processors/Brightness.cs b/src/ImageProcessor/Processors/Brightness.cs index 6671ec373..914f15d0a 100644 --- a/src/ImageProcessor/Processors/Brightness.cs +++ b/src/ImageProcessor/Processors/Brightness.cs @@ -25,7 +25,7 @@ namespace ImageProcessor.Processors { /// /// The regular expression to search strings for. - /// + /// /// private static readonly Regex QueryRegex = new Regex(@"brightness=(-?(?:100)|-?([1-9]?[0-9]))", RegexOptions.Compiled); diff --git a/src/ImageProcessor/Processors/Contrast.cs b/src/ImageProcessor/Processors/Contrast.cs index 4d057d6d5..545a4b0c2 100644 --- a/src/ImageProcessor/Processors/Contrast.cs +++ b/src/ImageProcessor/Processors/Contrast.cs @@ -25,7 +25,7 @@ namespace ImageProcessor.Processors { /// /// The regular expression to search strings for. - /// + /// /// private static readonly Regex QueryRegex = new Regex(@"contrast=(-?(?:100)|-?([1-9]?[0-9]))", RegexOptions.Compiled); diff --git a/src/ImageProcessor/Processors/Crop.cs b/src/ImageProcessor/Processors/Crop.cs index fa4f20ccf..b2ff1493e 100644 --- a/src/ImageProcessor/Processors/Crop.cs +++ b/src/ImageProcessor/Processors/Crop.cs @@ -30,7 +30,7 @@ namespace ImageProcessor.Processors { /// /// The regular expression to search strings for. - /// + /// /// private static readonly Regex QueryRegex = new Regex(@"crop=\d+(.\d+)?[,-]\d+(.\d+)?[,-]\d+(.\d+)?[,-]\d+(.\d+)?|cropmode=(pixels|percent)", RegexOptions.Compiled); diff --git a/src/ImageProcessor/Processors/Flip.cs b/src/ImageProcessor/Processors/Flip.cs index 81b3cd602..c845ba281 100644 --- a/src/ImageProcessor/Processors/Flip.cs +++ b/src/ImageProcessor/Processors/Flip.cs @@ -23,7 +23,7 @@ namespace ImageProcessor.Processors { /// /// The regular expression to search strings for. - /// + /// /// private static readonly Regex QueryRegex = new Regex(@"flip=(horizontal|vertical|both)", RegexOptions.Compiled); diff --git a/src/ImageProcessor/Processors/Rotate.cs b/src/ImageProcessor/Processors/Rotate.cs index da3e85e63..0547fad06 100644 --- a/src/ImageProcessor/Processors/Rotate.cs +++ b/src/ImageProcessor/Processors/Rotate.cs @@ -184,7 +184,7 @@ namespace ImageProcessor.Processors /// The background color to fill an image with. /// The image rotated to the given angle at the given position. /// - /// Based on + /// Based on /// private Bitmap RotateImage(Image image, float rotateAtX, float rotateAtY, float angle, Color backgroundColor) { diff --git a/src/ImageProcessor/Processors/Saturation.cs b/src/ImageProcessor/Processors/Saturation.cs index 268de2f4a..e3be5c312 100644 --- a/src/ImageProcessor/Processors/Saturation.cs +++ b/src/ImageProcessor/Processors/Saturation.cs @@ -23,13 +23,13 @@ namespace ImageProcessor.Processors /// Encapsulates methods to change the saturation component of the image. /// /// - /// + /// /// public class Saturation : IGraphicsProcessor { /// /// The regular expression to search strings for. - /// + /// /// private static readonly Regex QueryRegex = new Regex(@"saturation=(-?(?:100)|-?([1-9]?[0-9]))", RegexOptions.Compiled);