From 288a2f61e1407b2fe315c9a46d950bc2020c9bc0 Mon Sep 17 00:00:00 2001 From: Thomas Broust Date: Wed, 25 Jun 2014 23:59:37 +0200 Subject: [PATCH 01/20] Creates a new Mono project so it can at least build (not yet run) on Xamarin/Mono Former-commit-id: b625d699fc6c68456157f8509e8e219d67c6c204 --- .../HttpModules/ImageProcessingModule.cs | 4 +- .../ImageProcessorConsole.csproj | 1 + src/ImageProcessor_Mono.sln | 132 ++++++++++++++++++ 3 files changed, 135 insertions(+), 2 deletions(-) create mode 100644 src/ImageProcessor_Mono.sln diff --git a/src/ImageProcessor.Web/NET45/HttpModules/ImageProcessingModule.cs b/src/ImageProcessor.Web/NET45/HttpModules/ImageProcessingModule.cs index 67f3aee5d..33877e15b 100644 --- a/src/ImageProcessor.Web/NET45/HttpModules/ImageProcessingModule.cs +++ b/src/ImageProcessor.Web/NET45/HttpModules/ImageProcessingModule.cs @@ -126,7 +126,7 @@ namespace ImageProcessor.Web.HttpModules preserveExifMetaData = ImageProcessorConfiguration.Instance.PreserveExifMetaData; } -#if NET45 +#if NET45 && !__MonoCS__ EventHandlerTaskAsyncHelper wrapper = new EventHandlerTaskAsyncHelper(this.PostAuthorizeRequest); context.AddOnPostAuthorizeRequestAsync(wrapper.BeginEventHandler, wrapper.EndEventHandler); #else @@ -194,7 +194,7 @@ namespace ImageProcessor.Web.HttpModules } #endregion -#if NET45 +#if NET45 && !__MonoCS__ /// /// Occurs when the user for the current request has been authorized. diff --git a/src/ImageProcessorConsole/ImageProcessorConsole.csproj b/src/ImageProcessorConsole/ImageProcessorConsole.csproj index 09423698e..df60cf14b 100644 --- a/src/ImageProcessorConsole/ImageProcessorConsole.csproj +++ b/src/ImageProcessorConsole/ImageProcessorConsole.csproj @@ -9,6 +9,7 @@ Properties ImageProcessorConsole ImageProcessorConsole + v4.5 512 true Client diff --git a/src/ImageProcessor_Mono.sln b/src/ImageProcessor_Mono.sln new file mode 100644 index 000000000..d7e1410a8 --- /dev/null +++ b/src/ImageProcessor_Mono.sln @@ -0,0 +1,132 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# 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}" + ProjectSection(SolutionItems) = preProject + ImageProcessor.vsmdi = ImageProcessor.vsmdi + Local.testsettings = Local.testsettings + EndProjectSection +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".nuget", ".nuget", "{1E656CDE-124D-4FAF-837C-0EF1E192D418}" + ProjectSection(SolutionItems) = preProject + .nuget\NuGet.Config = .nuget\NuGet.Config + .nuget\NuGet.exe = .nuget\NuGet.exe + .nuget\NuGet.targets = .nuget\NuGet.targets + EndProjectSection +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ImageProcessor", "ImageProcessor\ImageProcessor.csproj", "{3B5DD734-FB7A-487D-8CE6-55E7AF9AEA7E}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Test_Website_MVC_NET4", "TestWebsites\NET4\Test_Website_MVC_NET4.csproj", "{30327C08-7574-4D7E-AC95-6A58753C6855}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ImageProcessor.Web_NET4", "ImageProcessor.Web\NET4\ImageProcessor.Web_NET4.csproj", "{4F7050F2-465F-4E10-8DB2-2FB97AC6AA43}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ImageProcessor.Web_NET45", "ImageProcessor.Web\NET45\ImageProcessor.Web_NET45.csproj", "{D011A778-59C8-4BFA-A770-C350216BF161}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ImageProcessorConsole", "ImageProcessorConsole\ImageProcessorConsole.csproj", "{7BF5274B-56A7-4B62-8105-E9BDF25BAFE7}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + All|Any CPU = All|Any CPU + All|Mixed Platforms = All|Mixed Platforms + All|x86 = All|x86 + Debug|Any CPU = Debug|Any CPU + Debug|Mixed Platforms = Debug|Mixed Platforms + Debug|x86 = Debug|x86 + Release|Any CPU = Release|Any CPU + Release|Mixed Platforms = Release|Mixed Platforms + Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {30327C08-7574-4D7E-AC95-6A58753C6855}.All|Any CPU.ActiveCfg = All|Any CPU + {30327C08-7574-4D7E-AC95-6A58753C6855}.All|Any CPU.Build.0 = All|Any CPU + {30327C08-7574-4D7E-AC95-6A58753C6855}.All|Mixed Platforms.ActiveCfg = All|x86 + {30327C08-7574-4D7E-AC95-6A58753C6855}.All|Mixed Platforms.Build.0 = All|x86 + {30327C08-7574-4D7E-AC95-6A58753C6855}.All|x86.ActiveCfg = All|x86 + {30327C08-7574-4D7E-AC95-6A58753C6855}.All|x86.Build.0 = All|x86 + {30327C08-7574-4D7E-AC95-6A58753C6855}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {30327C08-7574-4D7E-AC95-6A58753C6855}.Debug|Any CPU.Build.0 = Debug|Any CPU + {30327C08-7574-4D7E-AC95-6A58753C6855}.Debug|Mixed Platforms.ActiveCfg = Debug|x86 + {30327C08-7574-4D7E-AC95-6A58753C6855}.Debug|Mixed Platforms.Build.0 = Debug|x86 + {30327C08-7574-4D7E-AC95-6A58753C6855}.Debug|x86.ActiveCfg = Debug|x86 + {30327C08-7574-4D7E-AC95-6A58753C6855}.Debug|x86.Build.0 = Debug|x86 + {30327C08-7574-4D7E-AC95-6A58753C6855}.Release|Any CPU.ActiveCfg = Release|Any CPU + {30327C08-7574-4D7E-AC95-6A58753C6855}.Release|Any CPU.Build.0 = Release|Any CPU + {30327C08-7574-4D7E-AC95-6A58753C6855}.Release|Mixed Platforms.ActiveCfg = Release|x86 + {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 + {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 + {4F7050F2-465F-4E10-8DB2-2FB97AC6AA43}.All|Mixed Platforms.Build.0 = All|Any CPU + {4F7050F2-465F-4E10-8DB2-2FB97AC6AA43}.All|x86.ActiveCfg = All|Any CPU + {4F7050F2-465F-4E10-8DB2-2FB97AC6AA43}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {4F7050F2-465F-4E10-8DB2-2FB97AC6AA43}.Debug|Any CPU.Build.0 = Debug|Any CPU + {4F7050F2-465F-4E10-8DB2-2FB97AC6AA43}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU + {4F7050F2-465F-4E10-8DB2-2FB97AC6AA43}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU + {4F7050F2-465F-4E10-8DB2-2FB97AC6AA43}.Debug|x86.ActiveCfg = Debug|Any CPU + {4F7050F2-465F-4E10-8DB2-2FB97AC6AA43}.Release|Any CPU.ActiveCfg = Release|Any CPU + {4F7050F2-465F-4E10-8DB2-2FB97AC6AA43}.Release|Any CPU.Build.0 = Release|Any CPU + {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 + {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 + {7BF5274B-56A7-4B62-8105-E9BDF25BAFE7}.All|Mixed Platforms.Build.0 = Release|Any CPU + {7BF5274B-56A7-4B62-8105-E9BDF25BAFE7}.All|x86.ActiveCfg = Release|Any CPU + {7BF5274B-56A7-4B62-8105-E9BDF25BAFE7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {7BF5274B-56A7-4B62-8105-E9BDF25BAFE7}.Debug|Any CPU.Build.0 = Debug|Any CPU + {7BF5274B-56A7-4B62-8105-E9BDF25BAFE7}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU + {7BF5274B-56A7-4B62-8105-E9BDF25BAFE7}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU + {7BF5274B-56A7-4B62-8105-E9BDF25BAFE7}.Debug|x86.ActiveCfg = Debug|Any CPU + {7BF5274B-56A7-4B62-8105-E9BDF25BAFE7}.Release|Any CPU.ActiveCfg = Release|Any CPU + {7BF5274B-56A7-4B62-8105-E9BDF25BAFE7}.Release|Any CPU.Build.0 = Release|Any CPU + {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 + {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 + EndGlobalSection + GlobalSection(NestedProjects) = preSolution + EndGlobalSection + GlobalSection(MonoDevelopProperties) = preSolution + StartupItem = ImageProcessor\ImageProcessor.csproj + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(TestCaseManagementSettings) = postSolution + CategoryFile = ImageProcessor.vsmdi + EndGlobalSection +EndGlobal From 6d37f951bfd7e9afb08f98886e4bcfd6151e9358 Mon Sep 17 00:00:00 2001 From: Thomas Broust Date: Thu, 26 Jun 2014 00:08:55 +0200 Subject: [PATCH 02/20] Removes MVC test project from Mono solution because of heavy dependencies Former-commit-id: 659283d5017efeda799e0bf5227ed07e2ce41c15 --- src/ImageProcessor_Mono.sln | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/src/ImageProcessor_Mono.sln b/src/ImageProcessor_Mono.sln index d7e1410a8..7d47a2ca6 100644 --- a/src/ImageProcessor_Mono.sln +++ b/src/ImageProcessor_Mono.sln @@ -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}") = "Test_Website_MVC_NET4", "TestWebsites\NET4\Test_Website_MVC_NET4.csproj", "{30327C08-7574-4D7E-AC95-6A58753C6855}" -EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ImageProcessor.Web_NET4", "ImageProcessor.Web\NET4\ImageProcessor.Web_NET4.csproj", "{4F7050F2-465F-4E10-8DB2-2FB97AC6AA43}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ImageProcessor.Web_NET45", "ImageProcessor.Web\NET45\ImageProcessor.Web_NET45.csproj", "{D011A778-59C8-4BFA-A770-C350216BF161}" @@ -39,24 +37,6 @@ Global Release|x86 = Release|x86 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {30327C08-7574-4D7E-AC95-6A58753C6855}.All|Any CPU.ActiveCfg = All|Any CPU - {30327C08-7574-4D7E-AC95-6A58753C6855}.All|Any CPU.Build.0 = All|Any CPU - {30327C08-7574-4D7E-AC95-6A58753C6855}.All|Mixed Platforms.ActiveCfg = All|x86 - {30327C08-7574-4D7E-AC95-6A58753C6855}.All|Mixed Platforms.Build.0 = All|x86 - {30327C08-7574-4D7E-AC95-6A58753C6855}.All|x86.ActiveCfg = All|x86 - {30327C08-7574-4D7E-AC95-6A58753C6855}.All|x86.Build.0 = All|x86 - {30327C08-7574-4D7E-AC95-6A58753C6855}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {30327C08-7574-4D7E-AC95-6A58753C6855}.Debug|Any CPU.Build.0 = Debug|Any CPU - {30327C08-7574-4D7E-AC95-6A58753C6855}.Debug|Mixed Platforms.ActiveCfg = Debug|x86 - {30327C08-7574-4D7E-AC95-6A58753C6855}.Debug|Mixed Platforms.Build.0 = Debug|x86 - {30327C08-7574-4D7E-AC95-6A58753C6855}.Debug|x86.ActiveCfg = Debug|x86 - {30327C08-7574-4D7E-AC95-6A58753C6855}.Debug|x86.Build.0 = Debug|x86 - {30327C08-7574-4D7E-AC95-6A58753C6855}.Release|Any CPU.ActiveCfg = Release|Any CPU - {30327C08-7574-4D7E-AC95-6A58753C6855}.Release|Any CPU.Build.0 = Release|Any CPU - {30327C08-7574-4D7E-AC95-6A58753C6855}.Release|Mixed Platforms.ActiveCfg = Release|x86 - {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 {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 From b3b6c09dbadd91b97b0edbd68c46142a249b3ebe Mon Sep 17 00:00:00 2001 From: James South Date: Thu, 26 Jun 2014 22:30:08 +0100 Subject: [PATCH 03/20] Separating Unit Tests Hopefully rebuilding the projects will fix the AppVeyor issues. Former-commit-id: 3fe1413372e450bc1a33be212c36687cd85d7678 --- .../ImageProcessor.UnitTests.csproj | 282 ++++++++++-------- .../Properties/AssemblyInfo.cs | 36 +++ src/ImageProcessor.UnitTests/packages.config | 2 +- .../ImageProcessor.Web.UnitTests.csproj | 106 +++++++ .../Properties/AssemblyInfo.cs | 36 +++ .../RegularExpressionUnitTests.cs | 26 +- .../packages.config | 4 + src/ImageProcessor.sln | 182 +++++------ src/packages/repositories.config | 2 + 9 files changed, 458 insertions(+), 218 deletions(-) create mode 100644 src/ImageProcessor.UnitTests/Properties/AssemblyInfo.cs create mode 100644 src/ImageProcessor.Web.UnitTests/ImageProcessor.Web.UnitTests.csproj create mode 100644 src/ImageProcessor.Web.UnitTests/Properties/AssemblyInfo.cs rename src/{ImageProcessor.UnitTests => ImageProcessor.Web.UnitTests}/RegularExpressionUnitTests.cs (87%) create mode 100644 src/ImageProcessor.Web.UnitTests/packages.config diff --git a/src/ImageProcessor.UnitTests/ImageProcessor.UnitTests.csproj b/src/ImageProcessor.UnitTests/ImageProcessor.UnitTests.csproj index afce9a1d2..2be742cb4 100644 --- a/src/ImageProcessor.UnitTests/ImageProcessor.UnitTests.csproj +++ b/src/ImageProcessor.UnitTests/ImageProcessor.UnitTests.csproj @@ -1,178 +1,215 @@  - + Debug AnyCPU - {03CA9055-F997-428C-BF28-F50F991777C6} + {633B1C4C-4823-47BE-9A01-A665F3118C8C} Library + Properties ImageProcessor.UnitTests ImageProcessor.UnitTests - - + v4.0 + 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 - v4.5 + true full false - bin\Debug - DEBUG; + bin\Debug\ + DEBUG;TRACE prompt 4 - false - false - full + pdbonly true - bin\Release + bin\Release\ + TRACE prompt 4 - false - false - - ..\packages\NUnit.2.6.3\lib\nunit.framework.dll - - + + + + + + + + + + - + - - - {d011a778-59c8-4bfa-a770-c350216bf161} - ImageProcessor.Web_NET45 - - - {3B5DD734-FB7A-487D-8CE6-55E7AF9AEA7E} - ImageProcessor - + - - + + Images\1182076_e8c402e938_z.jpg + + + Images\bus.jpg + + Images\Chrysanthemum.jpg - PreserveNewest - - + + + Images\circle.png + + + Images\cmyk.jpg + + + Images\cmyk.png + + + Images\color-vision-test.gif + + Images\Desert.jpg - PreserveNewest - - + + + Images\emma.jpg + + + Images\falahill_design__160p.jpg + + + Images\fid11246.jpg + + + Images\fid9141.jpg + + + Images\header_1.jpg + + Images\Hydrangeas.jpg - PreserveNewest - - + + Images\Jellyfish.jpg - PreserveNewest - - + + + Images\jrt.jpg + + Images\Koala.jpg - PreserveNewest - - + + Images\Lighthouse.jpg - PreserveNewest - - + + + Images\lomo.jpg + + + Images\meter.gif + + + Images\negative.png + + + Images\negative2.png + + 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\Tulips.jpg + + Images\udendørs-374.jpg - PreserveNewest - - + + Images\udendørs.jpg - PreserveNewest - + + + Images\war_horse_quad.jpg + + + Images\WP_000009.jpg + - + + + {3b5dd734-fb7a-487d-8ce6-55e7af9aea7e} + ImageProcessor + + + + + + + False + + + False + + + False + + + False + + + + + + @@ -180,4 +217,11 @@ + \ No newline at end of file diff --git a/src/ImageProcessor.UnitTests/Properties/AssemblyInfo.cs b/src/ImageProcessor.UnitTests/Properties/AssemblyInfo.cs new file mode 100644 index 000000000..fb042a1d3 --- /dev/null +++ b/src/ImageProcessor.UnitTests/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +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.UnitTests2")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("ImageProcessor.UnitTests2")] +[assembly: AssemblyCopyright("Copyright © 2014")] +[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("3003f5a6-eb11-4eee-bfaa-448deb3a31d9")] + +// 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.UnitTests/packages.config b/src/ImageProcessor.UnitTests/packages.config index 5a3253fcb..a18b325a4 100644 --- a/src/ImageProcessor.UnitTests/packages.config +++ b/src/ImageProcessor.UnitTests/packages.config @@ -1,4 +1,4 @@  - + \ No newline at end of file diff --git a/src/ImageProcessor.Web.UnitTests/ImageProcessor.Web.UnitTests.csproj b/src/ImageProcessor.Web.UnitTests/ImageProcessor.Web.UnitTests.csproj new file mode 100644 index 000000000..17c54d202 --- /dev/null +++ b/src/ImageProcessor.Web.UnitTests/ImageProcessor.Web.UnitTests.csproj @@ -0,0 +1,106 @@ + + + + Debug + AnyCPU + {961340C8-8C93-401D-A0A2-FF9EC61E5260} + Library + Properties + ImageProcessor.Web.UnitTests + ImageProcessor.Web.UnitTests + v4.5.1 + 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 + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + ..\packages\NUnit.2.6.3\lib\nunit.framework.dll + + + + + + + + + + + + + + + + + + + + + + {d011a778-59c8-4bfa-a770-c350216bf161} + ImageProcessor.Web_NET45 + + + {3b5dd734-fb7a-487d-8ce6-55e7af9aea7e} + ImageProcessor + + + + + + + False + + + False + + + False + + + False + + + + + + + + + + This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. + + + + + \ No newline at end of file diff --git a/src/ImageProcessor.Web.UnitTests/Properties/AssemblyInfo.cs b/src/ImageProcessor.Web.UnitTests/Properties/AssemblyInfo.cs new file mode 100644 index 000000000..db6aa3c94 --- /dev/null +++ b/src/ImageProcessor.Web.UnitTests/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +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.Web.UnitTests")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("ImageProcessor.Web.UnitTests")] +[assembly: AssemblyCopyright("Copyright © 2014")] +[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("74919969-6a75-4d26-b1b8-0626aa10af6d")] + +// 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.UnitTests/RegularExpressionUnitTests.cs b/src/ImageProcessor.Web.UnitTests/RegularExpressionUnitTests.cs similarity index 87% rename from src/ImageProcessor.UnitTests/RegularExpressionUnitTests.cs rename to src/ImageProcessor.Web.UnitTests/RegularExpressionUnitTests.cs index 417e94f8c..c41454563 100644 --- a/src/ImageProcessor.UnitTests/RegularExpressionUnitTests.cs +++ b/src/ImageProcessor.Web.UnitTests/RegularExpressionUnitTests.cs @@ -8,7 +8,7 @@ // // -------------------------------------------------------------------------------------------------------------------- -namespace ImageProcessor.UnitTests +namespace ImageProcessor.Web.UnitTests { using System.Drawing; using ImageProcessor.Imaging; @@ -31,7 +31,7 @@ namespace ImageProcessor.UnitTests const string Querystring = "alpha=56"; const int Expected = 56; - Web.Processors.Alpha alpha = new Web.Processors.Alpha(); + Processors.Alpha alpha = new Processors.Alpha(); alpha.MatchRegexIndex(Querystring); int actual = alpha.Processor.DynamicParameter; @@ -48,7 +48,7 @@ namespace ImageProcessor.UnitTests const string Querystring = "brightness=56"; const int Expected = 56; - Web.Processors.Brightness brightness = new Web.Processors.Brightness(); + Processors.Brightness brightness = new Processors.Brightness(); brightness.MatchRegexIndex(Querystring); int actual = brightness.Processor.DynamicParameter; @@ -65,7 +65,7 @@ namespace ImageProcessor.UnitTests const string Querystring = "contrast=56"; const int Expected = 56; - Web.Processors.Contrast contrast = new Web.Processors.Contrast(); + Processors.Contrast contrast = new Processors.Contrast(); contrast.MatchRegexIndex(Querystring); int actual = contrast.Processor.DynamicParameter; @@ -82,7 +82,7 @@ namespace ImageProcessor.UnitTests const string Querystring = "crop=0,0,150,300"; CropLayer expected = new CropLayer(0, 0, 150, 300, CropMode.Pixels); - Web.Processors.Crop crop = new Web.Processors.Crop(); + Processors.Crop crop = new Processors.Crop(); crop.MatchRegexIndex(Querystring); CropLayer actual = crop.Processor.DynamicParameter; @@ -99,7 +99,7 @@ namespace ImageProcessor.UnitTests const string Querystring = "filter=lomograph"; IMatrixFilter expected = MatrixFilters.Lomograph; - Web.Processors.Filter filter = new Web.Processors.Filter(); + Processors.Filter filter = new Processors.Filter(); filter.MatchRegexIndex(Querystring); IMatrixFilter actual = filter.Processor.DynamicParameter; @@ -116,7 +116,7 @@ namespace ImageProcessor.UnitTests const string Querystring = "format=gif"; ISupportedImageFormat expected = new GifFormat(); - Web.Processors.Format format = new Web.Processors.Format(); + Processors.Format format = new Processors.Format(); format.MatchRegexIndex(Querystring); ISupportedImageFormat actual = format.Processor.DynamicParameter; @@ -133,7 +133,7 @@ namespace ImageProcessor.UnitTests const string Querystring = "quality=56"; const int Expected = 56; - Web.Processors.Quality quality = new Web.Processors.Quality(); + Processors.Quality quality = new Processors.Quality(); quality.MatchRegexIndex(Querystring); int actual = quality.Processor.DynamicParameter; @@ -150,7 +150,7 @@ namespace ImageProcessor.UnitTests const string Querystring = "width=300"; ResizeLayer expected = new ResizeLayer(new Size(300, 0)); - Web.Processors.Resize resize = new Web.Processors.Resize(); + Processors.Resize resize = new Processors.Resize(); resize.MatchRegexIndex(Querystring); ResizeLayer actual = resize.Processor.DynamicParameter; @@ -167,7 +167,7 @@ namespace ImageProcessor.UnitTests const string Querystring = "rotate=270"; const int Expected = 270; - Web.Processors.Rotate rotate = new Web.Processors.Rotate(); + Processors.Rotate rotate = new Processors.Rotate(); rotate.MatchRegexIndex(Querystring); int actual = rotate.Processor.DynamicParameter; @@ -183,7 +183,7 @@ namespace ImageProcessor.UnitTests { const string Querystring = "roundedcorners=30"; RoundedCornerLayer expected = new RoundedCornerLayer(30, true, true, true, true); - Web.Processors.RoundedCorners roundedCorners = new Web.Processors.RoundedCorners(); + Processors.RoundedCorners roundedCorners = new Processors.RoundedCorners(); roundedCorners.MatchRegexIndex(Querystring); RoundedCornerLayer actual = roundedCorners.Processor.DynamicParameter; @@ -202,12 +202,12 @@ namespace ImageProcessor.UnitTests Color expectedHex = ColorTranslator.FromHtml("#" + "6aa6cc"); Color expectedRgba = Color.FromArgb(255, 106, 166, 204); - Web.Processors.Tint tint = new Web.Processors.Tint(); + Processors.Tint tint = new Processors.Tint(); tint.MatchRegexIndex(HexQuerystring); Color actualHex = tint.Processor.DynamicParameter; Assert.AreEqual(expectedHex, actualHex); - tint = new Web.Processors.Tint(); + tint = new Processors.Tint(); tint.MatchRegexIndex(RgbaQuerystring); Color actualRgba = tint.Processor.DynamicParameter; Assert.AreEqual(expectedRgba, actualRgba); diff --git a/src/ImageProcessor.Web.UnitTests/packages.config b/src/ImageProcessor.Web.UnitTests/packages.config new file mode 100644 index 000000000..139d5138c --- /dev/null +++ b/src/ImageProcessor.Web.UnitTests/packages.config @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/src/ImageProcessor.sln b/src/ImageProcessor.sln index 186a446c7..a12d17c68 100644 --- a/src/ImageProcessor.sln +++ b/src/ImageProcessor.sln @@ -1,7 +1,7 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 2012 -VisualStudioVersion = 12.0.30110.0 +# Visual Studio 2013 +VisualStudioVersion = 12.0.30501.0 MinimumVisualStudioVersion = 10.0.40219.1 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{C427A497-74DC-49B1-8420-D6E68354F29B}" ProjectSection(SolutionItems) = preProject @@ -32,7 +32,9 @@ 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}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ImageProcessor.Web.UnitTests", "ImageProcessor.Web.UnitTests\ImageProcessor.Web.UnitTests.csproj", "{961340C8-8C93-401D-A0A2-FF9EC61E5260}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ImageProcessor.UnitTests", "ImageProcessor.UnitTests\ImageProcessor.UnitTests.csproj", "{633B1C4C-4823-47BE-9A01-A665F3118C8C}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -47,24 +49,21 @@ Global Release|x86 = Release|x86 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {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 + {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 {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 @@ -97,21 +96,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 - {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 + {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 {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 @@ -127,36 +126,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 - {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 - {7BF5274B-56A7-4B62-8105-E9BDF25BAFE7}.All|Mixed Platforms.Build.0 = Release|Any CPU - {7BF5274B-56A7-4B62-8105-E9BDF25BAFE7}.All|x86.ActiveCfg = Release|Any CPU - {7BF5274B-56A7-4B62-8105-E9BDF25BAFE7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {7BF5274B-56A7-4B62-8105-E9BDF25BAFE7}.Debug|Any CPU.Build.0 = Debug|Any CPU - {7BF5274B-56A7-4B62-8105-E9BDF25BAFE7}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU - {7BF5274B-56A7-4B62-8105-E9BDF25BAFE7}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU - {7BF5274B-56A7-4B62-8105-E9BDF25BAFE7}.Debug|x86.ActiveCfg = Debug|Any CPU - {7BF5274B-56A7-4B62-8105-E9BDF25BAFE7}.Release|Any CPU.ActiveCfg = Release|Any CPU - {7BF5274B-56A7-4B62-8105-E9BDF25BAFE7}.Release|Any CPU.Build.0 = Release|Any CPU - {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 @@ -172,30 +141,73 @@ Global {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 + {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 + {7BF5274B-56A7-4B62-8105-E9BDF25BAFE7}.All|Mixed Platforms.Build.0 = Release|Any CPU + {7BF5274B-56A7-4B62-8105-E9BDF25BAFE7}.All|x86.ActiveCfg = Release|Any CPU + {7BF5274B-56A7-4B62-8105-E9BDF25BAFE7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {7BF5274B-56A7-4B62-8105-E9BDF25BAFE7}.Debug|Any CPU.Build.0 = Debug|Any CPU + {7BF5274B-56A7-4B62-8105-E9BDF25BAFE7}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU + {7BF5274B-56A7-4B62-8105-E9BDF25BAFE7}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU + {7BF5274B-56A7-4B62-8105-E9BDF25BAFE7}.Debug|x86.ActiveCfg = Debug|Any CPU + {7BF5274B-56A7-4B62-8105-E9BDF25BAFE7}.Release|Any CPU.ActiveCfg = Release|Any CPU + {7BF5274B-56A7-4B62-8105-E9BDF25BAFE7}.Release|Any CPU.Build.0 = Release|Any CPU + {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 + {961340C8-8C93-401D-A0A2-FF9EC61E5260}.All|Any CPU.ActiveCfg = Release|Any CPU + {961340C8-8C93-401D-A0A2-FF9EC61E5260}.All|Any CPU.Build.0 = Release|Any CPU + {961340C8-8C93-401D-A0A2-FF9EC61E5260}.All|Mixed Platforms.ActiveCfg = Release|Any CPU + {961340C8-8C93-401D-A0A2-FF9EC61E5260}.All|Mixed Platforms.Build.0 = Release|Any CPU + {961340C8-8C93-401D-A0A2-FF9EC61E5260}.All|x86.ActiveCfg = Release|Any CPU + {961340C8-8C93-401D-A0A2-FF9EC61E5260}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {961340C8-8C93-401D-A0A2-FF9EC61E5260}.Debug|Any CPU.Build.0 = Debug|Any CPU + {961340C8-8C93-401D-A0A2-FF9EC61E5260}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU + {961340C8-8C93-401D-A0A2-FF9EC61E5260}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU + {961340C8-8C93-401D-A0A2-FF9EC61E5260}.Debug|x86.ActiveCfg = Debug|Any CPU + {961340C8-8C93-401D-A0A2-FF9EC61E5260}.Release|Any CPU.ActiveCfg = Release|Any CPU + {961340C8-8C93-401D-A0A2-FF9EC61E5260}.Release|Any CPU.Build.0 = Release|Any CPU + {961340C8-8C93-401D-A0A2-FF9EC61E5260}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU + {961340C8-8C93-401D-A0A2-FF9EC61E5260}.Release|Mixed Platforms.Build.0 = Release|Any CPU + {961340C8-8C93-401D-A0A2-FF9EC61E5260}.Release|x86.ActiveCfg = Release|Any CPU + {633B1C4C-4823-47BE-9A01-A665F3118C8C}.All|Any CPU.ActiveCfg = Release|Any CPU + {633B1C4C-4823-47BE-9A01-A665F3118C8C}.All|Any CPU.Build.0 = Release|Any CPU + {633B1C4C-4823-47BE-9A01-A665F3118C8C}.All|Mixed Platforms.ActiveCfg = Release|Any CPU + {633B1C4C-4823-47BE-9A01-A665F3118C8C}.All|Mixed Platforms.Build.0 = Release|Any CPU + {633B1C4C-4823-47BE-9A01-A665F3118C8C}.All|x86.ActiveCfg = Release|Any CPU + {633B1C4C-4823-47BE-9A01-A665F3118C8C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {633B1C4C-4823-47BE-9A01-A665F3118C8C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {633B1C4C-4823-47BE-9A01-A665F3118C8C}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU + {633B1C4C-4823-47BE-9A01-A665F3118C8C}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU + {633B1C4C-4823-47BE-9A01-A665F3118C8C}.Debug|x86.ActiveCfg = Debug|Any CPU + {633B1C4C-4823-47BE-9A01-A665F3118C8C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {633B1C4C-4823-47BE-9A01-A665F3118C8C}.Release|Any CPU.Build.0 = Release|Any CPU + {633B1C4C-4823-47BE-9A01-A665F3118C8C}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU + {633B1C4C-4823-47BE-9A01-A665F3118C8C}.Release|Mixed Platforms.Build.0 = Release|Any CPU + {633B1C4C-4823-47BE-9A01-A665F3118C8C}.Release|x86.ActiveCfg = Release|Any CPU EndGlobalSection - GlobalSection(NestedProjects) = preSolution + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE EndGlobalSection GlobalSection(MonoDevelopProperties) = preSolution StartupItem = ImageProcessorConsole\ImageProcessorConsole.csproj EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection GlobalSection(TestCaseManagementSettings) = postSolution CategoryFile = ImageProcessor.vsmdi EndGlobalSection diff --git a/src/packages/repositories.config b/src/packages/repositories.config index 73ccce20c..14108b962 100644 --- a/src/packages/repositories.config +++ b/src/packages/repositories.config @@ -1,6 +1,8 @@  + + From 54d237180121ca92208916ee068a8247509cf07f Mon Sep 17 00:00:00 2001 From: James South Date: Thu, 26 Jun 2014 22:59:30 +0100 Subject: [PATCH 04/20] Moving Images in unit test Former-commit-id: fbac18062ba6e6102eb2437bfbd830022ce1885b --- .../ImageFactoryUnitTests.cs | 2 +- .../ImageProcessor.UnitTests.csproj | 133 ++---------------- .../Images/Chrysanthemum.jpg.REMOVED.git-id | 1 + .../Images/Desert.jpg.REMOVED.git-id | 1 + .../Images/Penguins.bmp.REMOVED.git-id | 1 + .../Images/Penguins.gif.REMOVED.git-id | 1 + .../Images/cmyk.png.REMOVED.git-id | 1 + 7 files changed, 14 insertions(+), 126 deletions(-) create mode 100644 src/ImageProcessor.UnitTests/Images/Chrysanthemum.jpg.REMOVED.git-id create mode 100644 src/ImageProcessor.UnitTests/Images/Desert.jpg.REMOVED.git-id create mode 100644 src/ImageProcessor.UnitTests/Images/Penguins.bmp.REMOVED.git-id create mode 100644 src/ImageProcessor.UnitTests/Images/Penguins.gif.REMOVED.git-id create mode 100644 src/ImageProcessor.UnitTests/Images/cmyk.png.REMOVED.git-id diff --git a/src/ImageProcessor.UnitTests/ImageFactoryUnitTests.cs b/src/ImageProcessor.UnitTests/ImageFactoryUnitTests.cs index 940702f9c..a63f95ff2 100644 --- a/src/ImageProcessor.UnitTests/ImageFactoryUnitTests.cs +++ b/src/ImageProcessor.UnitTests/ImageFactoryUnitTests.cs @@ -42,7 +42,7 @@ namespace ImageProcessor.UnitTests [TestCase("Penguins.gif", "image/gif")] public void TestLoadImageFromFile(string fileName, string expectedMime) { - var testPhoto = Path.Combine(this.localPath, string.Format("Images/{0}", fileName)); + string testPhoto = Path.Combine(this.localPath, string.Format("../../Images/{0}", fileName)); using (ImageFactory imageFactory = new ImageFactory()) { imageFactory.Load(testPhoto); diff --git a/src/ImageProcessor.UnitTests/ImageProcessor.UnitTests.csproj b/src/ImageProcessor.UnitTests/ImageProcessor.UnitTests.csproj index 2be742cb4..81516b4b6 100644 --- a/src/ImageProcessor.UnitTests/ImageProcessor.UnitTests.csproj +++ b/src/ImageProcessor.UnitTests/ImageProcessor.UnitTests.csproj @@ -59,137 +59,20 @@ - - - Images\1182076_e8c402e938_z.jpg - - - Images\bus.jpg - - - Images\Chrysanthemum.jpg - - - Images\circle.png - - - Images\cmyk.jpg - - - Images\cmyk.png - - - Images\color-vision-test.gif - - - Images\Desert.jpg - - - Images\emma.jpg - - - Images\falahill_design__160p.jpg - - - Images\fid11246.jpg - - - Images\fid9141.jpg - - - Images\header_1.jpg - - - Images\Hydrangeas.jpg - - - Images\Jellyfish.jpg - - - Images\jrt.jpg - - - Images\Koala.jpg - - - Images\Lighthouse.jpg - - - Images\lomo.jpg - - - Images\meter.gif - - - Images\negative.png - - - Images\negative2.png - - - Images\Penguins-200.jpg - - - Images\Penguins-8.png - - - Images\Penguins.bmp - - - Images\Penguins.gif - - - Images\Penguins.jpg - - - Images\Penguins.png - - - Images\Penguins.tif - - - Images\rocks.jpg - - - Images\rotate.jpg - - - Images\sample1.jpg - - - Images\srgb.jpg - - - Images\srgb.png - - - Images\text.png - - - Images\thor.jpg - - - Images\Tulips.jpg - - - Images\udendørs-374.jpg - - - Images\udendørs.jpg - - - Images\war_horse_quad.jpg - - - Images\WP_000009.jpg - - {3b5dd734-fb7a-487d-8ce6-55e7af9aea7e} ImageProcessor + + + + + + + + diff --git a/src/ImageProcessor.UnitTests/Images/Chrysanthemum.jpg.REMOVED.git-id b/src/ImageProcessor.UnitTests/Images/Chrysanthemum.jpg.REMOVED.git-id new file mode 100644 index 000000000..d067665c9 --- /dev/null +++ b/src/ImageProcessor.UnitTests/Images/Chrysanthemum.jpg.REMOVED.git-id @@ -0,0 +1 @@ +757c2a628dd03b1cbe4b3ef07c153897a702b57a \ No newline at end of file diff --git a/src/ImageProcessor.UnitTests/Images/Desert.jpg.REMOVED.git-id b/src/ImageProcessor.UnitTests/Images/Desert.jpg.REMOVED.git-id new file mode 100644 index 000000000..228aac3ab --- /dev/null +++ b/src/ImageProcessor.UnitTests/Images/Desert.jpg.REMOVED.git-id @@ -0,0 +1 @@ +0b88c91336ff8073f34d21ccd683a01f0e0995da \ No newline at end of file diff --git a/src/ImageProcessor.UnitTests/Images/Penguins.bmp.REMOVED.git-id b/src/ImageProcessor.UnitTests/Images/Penguins.bmp.REMOVED.git-id new file mode 100644 index 000000000..74f69293c --- /dev/null +++ b/src/ImageProcessor.UnitTests/Images/Penguins.bmp.REMOVED.git-id @@ -0,0 +1 @@ +8150b46ab27c62ba51aaba551eef3f1a30f08de9 \ No newline at end of file diff --git a/src/ImageProcessor.UnitTests/Images/Penguins.gif.REMOVED.git-id b/src/ImageProcessor.UnitTests/Images/Penguins.gif.REMOVED.git-id new file mode 100644 index 000000000..ce873d473 --- /dev/null +++ b/src/ImageProcessor.UnitTests/Images/Penguins.gif.REMOVED.git-id @@ -0,0 +1 @@ +6ad3b846d4697584ff601ac481b14a4d3bbb5736 \ No newline at end of file diff --git a/src/ImageProcessor.UnitTests/Images/cmyk.png.REMOVED.git-id b/src/ImageProcessor.UnitTests/Images/cmyk.png.REMOVED.git-id new file mode 100644 index 000000000..aeca7b93c --- /dev/null +++ b/src/ImageProcessor.UnitTests/Images/cmyk.png.REMOVED.git-id @@ -0,0 +1 @@ +db4d55a332254cd6b41336c06f207682bf5a966f \ No newline at end of file From 10452c34e063f1aec388b5dc0de3111766f2f9c2 Mon Sep 17 00:00:00 2001 From: James South Date: Thu, 26 Jun 2014 23:31:00 +0100 Subject: [PATCH 05/20] No client profile in NET 4.5+ http://msdn.microsoft.com/en-us/library/cc656912(v=vs.110).aspx Former-commit-id: 52b2d9d854666e730273f6ee15c5aa3acbcdd228 --- src/ImageProcessorConsole/App.config | 6 +++--- src/ImageProcessorConsole/ImageProcessorConsole.csproj | 5 +++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/ImageProcessorConsole/App.config b/src/ImageProcessorConsole/App.config index 9c05822ff..d1428ad71 100644 --- a/src/ImageProcessorConsole/App.config +++ b/src/ImageProcessorConsole/App.config @@ -1,6 +1,6 @@ - + - + - \ No newline at end of file + diff --git a/src/ImageProcessorConsole/ImageProcessorConsole.csproj b/src/ImageProcessorConsole/ImageProcessorConsole.csproj index df60cf14b..fba366b0c 100644 --- a/src/ImageProcessorConsole/ImageProcessorConsole.csproj +++ b/src/ImageProcessorConsole/ImageProcessorConsole.csproj @@ -1,5 +1,5 @@  - + Debug @@ -12,7 +12,8 @@ v4.5 512 true - Client + + AnyCPU From 14eaf8b266f0f11579ed4f87506eff1c3adc605a Mon Sep 17 00:00:00 2001 From: Thomas Broust Date: Sat, 28 Jun 2014 15:42:31 +0200 Subject: [PATCH 06/20] Adds new test of factory for loading an image from a memory stream Former-commit-id: 98343f28edb50392fcad4d871451559a441e3152 --- .../ImageFactoryUnitTests.cs | 33 +++ .../ImageProcessor.UnitTests.csproj | 202 ++++++++++++------ src/ImageProcessor_Mono.sln | 26 ++- 3 files changed, 190 insertions(+), 71 deletions(-) diff --git a/src/ImageProcessor.UnitTests/ImageFactoryUnitTests.cs b/src/ImageProcessor.UnitTests/ImageFactoryUnitTests.cs index a63f95ff2..1fc782073 100644 --- a/src/ImageProcessor.UnitTests/ImageFactoryUnitTests.cs +++ b/src/ImageProcessor.UnitTests/ImageFactoryUnitTests.cs @@ -51,5 +51,38 @@ namespace ImageProcessor.UnitTests Assert.IsNotNull(imageFactory.Image); } } + + /// > + /// Tests the loading of image from a memory stream + /// + /// + /// The file Name. + /// + /// + /// The expected mime type. + /// + [Test] + [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 TestLoadImageFromMemory(string fileName, string expectedMime) + { + string testPhoto = Path.Combine(this.localPath, string.Format("../../Images/{0}", fileName)); + byte[] photoBytes = File.ReadAllBytes(testPhoto); + + // ImageProcessor + using (MemoryStream inStream = new MemoryStream(photoBytes)) + { + using (ImageFactory imageFactory = new ImageFactory()) + { + imageFactory.Load(inStream); + Assert.AreEqual(null, imageFactory.ImagePath); + Assert.AreEqual(expectedMime, imageFactory.CurrentImageFormat.MimeType); + Assert.IsNotNull(imageFactory.Image); + } + } + } } } \ No newline at end of file diff --git a/src/ImageProcessor.UnitTests/ImageProcessor.UnitTests.csproj b/src/ImageProcessor.UnitTests/ImageProcessor.UnitTests.csproj index 81516b4b6..d5841e6c2 100644 --- a/src/ImageProcessor.UnitTests/ImageProcessor.UnitTests.csproj +++ b/src/ImageProcessor.UnitTests/ImageProcessor.UnitTests.csproj @@ -1,98 +1,177 @@  - + Debug AnyCPU - {633B1C4C-4823-47BE-9A01-A665F3118C8C} + {03CA9055-F997-428C-BF28-F50F991777C6} Library - Properties ImageProcessor.UnitTests ImageProcessor.UnitTests - v4.0 - 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 - + v4.5 true full false - bin\Debug\ - DEBUG;TRACE + bin\Debug + DEBUG; prompt 4 + false + false - pdbonly + full true - bin\Release\ - TRACE + bin\Release prompt 4 + false + false + + ..\packages\NUnit.2.6.3\lib\nunit.framework.dll - - + + - - - - - - - - - - - - + + + {D011A778-59C8-4BFA-A770-C350216BF161} + ImageProcessor.Web_NET45 + - {3b5dd734-fb7a-487d-8ce6-55e7af9aea7e} + {3B5DD734-FB7A-487D-8CE6-55E7AF9AEA7E} ImageProcessor - - - - - - + + + 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 + - - - - - False - - - False - - - False - - - False - - - - - - + @@ -100,11 +179,4 @@ - \ No newline at end of file diff --git a/src/ImageProcessor_Mono.sln b/src/ImageProcessor_Mono.sln index 7d47a2ca6..8b1e0fb37 100644 --- a/src/ImageProcessor_Mono.sln +++ b/src/ImageProcessor_Mono.sln @@ -3,12 +3,6 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # 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}" - ProjectSection(SolutionItems) = preProject - ImageProcessor.vsmdi = ImageProcessor.vsmdi - Local.testsettings = Local.testsettings - EndProjectSection -EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".nuget", ".nuget", "{1E656CDE-124D-4FAF-837C-0EF1E192D418}" ProjectSection(SolutionItems) = preProject .nuget\NuGet.Config = .nuget\NuGet.Config @@ -24,6 +18,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ImageProcessor.Web_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 @@ -37,6 +33,24 @@ Global Release|x86 = Release|x86 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution + {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 {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 From 7c37f5e89a6b624d75a07fc1ec12b485537228cc Mon Sep 17 00:00:00 2001 From: Thomas Broust Date: Sat, 28 Jun 2014 18:03:26 +0200 Subject: [PATCH 07/20] Loads all the test images + tests a few filters as well (failing for gif images) Former-commit-id: 193b0354b1e8f9e227919084076d6fd1776425d1 --- .../ImageFactoryUnitTests.cs | 106 +++++++++++------- 1 file changed, 67 insertions(+), 39 deletions(-) diff --git a/src/ImageProcessor.UnitTests/ImageFactoryUnitTests.cs b/src/ImageProcessor.UnitTests/ImageFactoryUnitTests.cs index 1fc782073..7cd124b19 100644 --- a/src/ImageProcessor.UnitTests/ImageFactoryUnitTests.cs +++ b/src/ImageProcessor.UnitTests/ImageFactoryUnitTests.cs @@ -12,6 +12,7 @@ namespace ImageProcessor.UnitTests { using System; using System.IO; + using System.Collections.Generic; using NUnit.Framework; /// @@ -25,62 +26,89 @@ namespace ImageProcessor.UnitTests /// private readonly string localPath = Path.GetDirectoryName(new Uri(System.Reflection.Assembly.GetExecutingAssembly().CodeBase).LocalPath); + /// + /// Lists the input files in the Images folder + /// + /// The list of files. + private static IEnumerable ListInputFiles() + { + return Directory.GetFiles("./Images"); + } + /// /// Tests the loading of image from a file /// - /// - /// The file Name. - /// - /// - /// The expected mime type. - /// [Test] - [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) + public void TestLoadImageFromFile() { - string testPhoto = Path.Combine(this.localPath, string.Format("../../Images/{0}", fileName)); - using (ImageFactory imageFactory = new ImageFactory()) + foreach (var fileName in ListInputFiles()) { - imageFactory.Load(testPhoto); - Assert.AreEqual(testPhoto, imageFactory.ImagePath); - Assert.AreEqual(expectedMime, imageFactory.CurrentImageFormat.MimeType); - Assert.IsNotNull(imageFactory.Image); + using (var imageFactory = new ImageFactory()) + { + imageFactory.Load(fileName); + Assert.AreEqual(fileName, imageFactory.ImagePath); + Assert.IsNotNull(imageFactory.Image); + } } + } /// > /// Tests the loading of image from a memory stream /// - /// - /// The file Name. - /// - /// - /// The expected mime type. - /// [Test] - [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 TestLoadImageFromMemory(string fileName, string expectedMime) + public void TestLoadImageFromMemory() { - string testPhoto = Path.Combine(this.localPath, string.Format("../../Images/{0}", fileName)); - byte[] photoBytes = File.ReadAllBytes(testPhoto); + foreach (var fileName in ListInputFiles()) + { + byte[] photoBytes = File.ReadAllBytes(fileName); - // ImageProcessor - using (MemoryStream inStream = new MemoryStream(photoBytes)) + using (var inStream = new MemoryStream(photoBytes)) + { + using (var imageFactory = new ImageFactory()) + { + imageFactory.Load(inStream); + Assert.AreEqual(null, imageFactory.ImagePath); + Assert.IsNotNull(imageFactory.Image); + } + } + } + } + + /// + /// Tests that a filter is really applied by checking that the image is modified + /// + [Test] + public void ApplyEffectAlpha() + { + foreach (var fileName in ListInputFiles()) { - using (ImageFactory imageFactory = new ImageFactory()) + using (var imageFactory = new ImageFactory()) { - imageFactory.Load(inStream); - Assert.AreEqual(null, imageFactory.ImagePath); - Assert.AreEqual(expectedMime, imageFactory.CurrentImageFormat.MimeType); - Assert.IsNotNull(imageFactory.Image); + imageFactory.Load(fileName); + var original = imageFactory.Image.Clone(); + imageFactory.Alpha(50); + var modified = imageFactory.Image.Clone(); + Assert.AreNotEqual(original, modified); + } + } + } + + /// + /// Tests that a filter is really applied by checking that the image is modified + /// + [Test] + public void ApplyEffectBrightness() + { + foreach (var fileName in ListInputFiles()) + { + using (var imageFactory = new ImageFactory()) + { + imageFactory.Load(fileName); + var original = imageFactory.Image.Clone(); + imageFactory.Brightness(50); + var modified = imageFactory.Image.Clone(); + Assert.AreNotEqual(original, modified); } } } From 03c19e3ae249e90d165a21750084f19b680a4212 Mon Sep 17 00:00:00 2001 From: Thomas Broust Date: Sat, 28 Jun 2014 18:13:23 +0200 Subject: [PATCH 08/20] Adds test for constraints resize Former-commit-id: a30d4df7acc83a74eab1ed881a010fe14b42dd1f --- .../ImageFactoryUnitTests.cs | 24 +++++++++++++++---- .../ImageProcessor.UnitTests.csproj | 4 ---- 2 files changed, 19 insertions(+), 9 deletions(-) diff --git a/src/ImageProcessor.UnitTests/ImageFactoryUnitTests.cs b/src/ImageProcessor.UnitTests/ImageFactoryUnitTests.cs index 7cd124b19..b81cff068 100644 --- a/src/ImageProcessor.UnitTests/ImageFactoryUnitTests.cs +++ b/src/ImageProcessor.UnitTests/ImageFactoryUnitTests.cs @@ -21,11 +21,6 @@ namespace ImageProcessor.UnitTests [TestFixture] public class ImageFactoryUnitTests { - /// - /// The path to the binary's folder - /// - private readonly string localPath = Path.GetDirectoryName(new Uri(System.Reflection.Assembly.GetExecutingAssembly().CodeBase).LocalPath); - /// /// Lists the input files in the Images folder /// @@ -112,5 +107,24 @@ namespace ImageProcessor.UnitTests } } } + + /// + /// Tests that the image is well resized using constraints + /// + [Test] + public void ApplyConstraints() + { + foreach (var fileName in ListInputFiles()) + { + using (var imageFactory = new ImageFactory()) + { + imageFactory.Load(fileName); + var original = imageFactory.Image.Clone(); + imageFactory.Constrain(new System.Drawing.Size(200, 200)); + var modified = imageFactory.Image.Clone(); + Assert.AreNotEqual(original, modified); + } + } + } } } \ No newline at end of file diff --git a/src/ImageProcessor.UnitTests/ImageProcessor.UnitTests.csproj b/src/ImageProcessor.UnitTests/ImageProcessor.UnitTests.csproj index d5841e6c2..4bb9bf77f 100644 --- a/src/ImageProcessor.UnitTests/ImageProcessor.UnitTests.csproj +++ b/src/ImageProcessor.UnitTests/ImageProcessor.UnitTests.csproj @@ -82,10 +82,6 @@ Images\Lighthouse.jpg PreserveNewest - - Images\Penguins-200.jpg - PreserveNewest - Images\Penguins-8.png PreserveNewest From 12e8fbca6c13821247bd02c423ba7c912e4815cd Mon Sep 17 00:00:00 2001 From: Thomas Broust Date: Sat, 28 Jun 2014 18:16:34 +0200 Subject: [PATCH 09/20] Checks that the image is actually resized Former-commit-id: cf8a8931b6b28c4825283f3a6af4e8c4d087ca9e --- .../ImageFactoryUnitTests.cs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/ImageProcessor.UnitTests/ImageFactoryUnitTests.cs b/src/ImageProcessor.UnitTests/ImageFactoryUnitTests.cs index b81cff068..936c32345 100644 --- a/src/ImageProcessor.UnitTests/ImageFactoryUnitTests.cs +++ b/src/ImageProcessor.UnitTests/ImageFactoryUnitTests.cs @@ -83,8 +83,7 @@ namespace ImageProcessor.UnitTests imageFactory.Load(fileName); var original = imageFactory.Image.Clone(); imageFactory.Alpha(50); - var modified = imageFactory.Image.Clone(); - Assert.AreNotEqual(original, modified); + Assert.AreNotEqual(original, imageFactory.Image); } } } @@ -102,8 +101,7 @@ namespace ImageProcessor.UnitTests imageFactory.Load(fileName); var original = imageFactory.Image.Clone(); imageFactory.Brightness(50); - var modified = imageFactory.Image.Clone(); - Assert.AreNotEqual(original, modified); + Assert.AreNotEqual(original, imageFactory.Image); } } } @@ -114,15 +112,17 @@ namespace ImageProcessor.UnitTests [Test] public void ApplyConstraints() { + const int maxSize = 200; foreach (var fileName in ListInputFiles()) { using (var imageFactory = new ImageFactory()) { imageFactory.Load(fileName); var original = imageFactory.Image.Clone(); - imageFactory.Constrain(new System.Drawing.Size(200, 200)); - var modified = imageFactory.Image.Clone(); - Assert.AreNotEqual(original, modified); + imageFactory.Constrain(new System.Drawing.Size(maxSize, maxSize)); + Assert.AreNotEqual(original, imageFactory.Image); + Assert.LessOrEqual(maxSize, imageFactory.Image.Width); + Assert.LessOrEqual(maxSize, imageFactory.Image.Height); } } } From ea1ac25f949153235c0a43d4fbf86cdec5a3b668 Mon Sep 17 00:00:00 2001 From: Thomas Broust Date: Sat, 28 Jun 2014 18:52:29 +0200 Subject: [PATCH 10/20] First fix of an animated gif problem on Mono Former-commit-id: 43eebfe02b5974def03fbf40962c787c2c6cdf0a --- src/ImageProcessor/Imaging/Formats/FormatUtilities.cs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/ImageProcessor/Imaging/Formats/FormatUtilities.cs b/src/ImageProcessor/Imaging/Formats/FormatUtilities.cs index 36d2e3c07..3c6e3b3e0 100644 --- a/src/ImageProcessor/Imaging/Formats/FormatUtilities.cs +++ b/src/ImageProcessor/Imaging/Formats/FormatUtilities.cs @@ -135,12 +135,14 @@ namespace ImageProcessor.Imaging.Formats int frameCount = image.GetFrameCount(frameDimension); int last = frameCount - 1; int delay = 0; - int index = 0; List gifFrames = new List(); for (int i = 0; i < frameCount; i++) { - int thisDelay = BitConverter.ToInt32(image.GetPropertyItem(20736).Value, index); + // GDI returns a single array with all delays, while Mono returns a different array for each frame + image.SelectActiveFrame(frameDimension, i); + var times = image.GetPropertyItem(20736).Value; + int thisDelay = BitConverter.ToInt32(times, 4*i % times.Length); int toAddDelay = thisDelay * 10 < 20 ? 20 : thisDelay * 10; // Minimum delay is 20 ms // Find the frame @@ -156,7 +158,6 @@ namespace ImageProcessor.Imaging.Formats } delay += toAddDelay; - index += 4; } info.GifFrames = gifFrames; From 77c0887972a10af797c57dc4fce11660d6f61ba4 Mon Sep 17 00:00:00 2001 From: Thomas Broust Date: Sat, 28 Jun 2014 20:48:03 +0200 Subject: [PATCH 11/20] Fixes a unit test (wrong parameters order) Former-commit-id: bcfb1caf15531d47653132153ad26cef59668c0e --- src/ImageProcessor.UnitTests/ImageFactoryUnitTests.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ImageProcessor.UnitTests/ImageFactoryUnitTests.cs b/src/ImageProcessor.UnitTests/ImageFactoryUnitTests.cs index 936c32345..f81fd1c5b 100644 --- a/src/ImageProcessor.UnitTests/ImageFactoryUnitTests.cs +++ b/src/ImageProcessor.UnitTests/ImageFactoryUnitTests.cs @@ -121,8 +121,8 @@ namespace ImageProcessor.UnitTests var original = imageFactory.Image.Clone(); imageFactory.Constrain(new System.Drawing.Size(maxSize, maxSize)); Assert.AreNotEqual(original, imageFactory.Image); - Assert.LessOrEqual(maxSize, imageFactory.Image.Width); - Assert.LessOrEqual(maxSize, imageFactory.Image.Height); + Assert.LessOrEqual(imageFactory.Image.Width, maxSize); + Assert.LessOrEqual(imageFactory.Image.Height, maxSize); } } } From 91b5adbee502c8574a384fa345c59b50fd94879c Mon Sep 17 00:00:00 2001 From: Thomas Broust Date: Sat, 28 Jun 2014 22:25:54 +0200 Subject: [PATCH 12/20] Re-fix of a Mono problem + modify some 'var' usage Former-commit-id: 1a96ba18689b8aa25607f3b699971f39c16132f9 --- src/ImageProcessor/ImageFactory.cs | 62 ++++++++++++++++-------------- 1 file changed, 33 insertions(+), 29 deletions(-) diff --git a/src/ImageProcessor/ImageFactory.cs b/src/ImageProcessor/ImageFactory.cs index 540e34c9a..4a68a5e86 100644 --- a/src/ImageProcessor/ImageFactory.cs +++ b/src/ImageProcessor/ImageFactory.cs @@ -177,13 +177,13 @@ namespace ImageProcessor /// public ImageFactory Load(string imagePath) { - FileInfo fileInfo = new FileInfo(imagePath); + var fileInfo = new FileInfo(imagePath); if (fileInfo.Exists) { this.ImagePath = imagePath; // Open a file stream to prevent the need for lock. - using (FileStream fileStream = new FileStream(imagePath, FileMode.Open, FileAccess.Read)) + using (var fileStream = new FileStream(imagePath, FileMode.Open, FileAccess.Read)) { ISupportedImageFormat format = FormatUtilities.GetFormat(fileStream); @@ -192,7 +192,7 @@ namespace ImageProcessor throw new ImageFormatException("Input stream is not a supported format."); } - MemoryStream memoryStream = new MemoryStream(); + var memoryStream = new MemoryStream(); // Copy the stream. fileStream.CopyTo(memoryStream); @@ -240,7 +240,11 @@ namespace ImageProcessor if (this.ShouldProcess) { // Set our new image as the memory stream value. + #if !__MonoCS__ Image newImage = Image.FromStream(this.InputStream, true); + #else + Image newImage = Image.FromStream(this.InputStream); + #endif // Dispose and reassign the image. this.Image.Dispose(); @@ -275,7 +279,7 @@ namespace ImageProcessor percentage = 0; } - Alpha alpha = new Alpha { DynamicParameter = percentage }; + var alpha = new Alpha { DynamicParameter = percentage }; this.CurrentImageFormat.ApplyProcessor(alpha.ProcessImage, this); } @@ -293,7 +297,7 @@ namespace ImageProcessor { if (this.ShouldProcess) { - AutoRotate autoRotate = new AutoRotate(); + var autoRotate = new AutoRotate(); this.CurrentImageFormat.ApplyProcessor(autoRotate.ProcessImage, this); } @@ -320,7 +324,7 @@ namespace ImageProcessor percentage = 0; } - Brightness brightness = new Brightness { DynamicParameter = percentage }; + var brightness = new Brightness { DynamicParameter = percentage }; this.CurrentImageFormat.ApplyProcessor(brightness.ProcessImage, this); } @@ -340,7 +344,7 @@ namespace ImageProcessor { if (this.ShouldProcess) { - ResizeLayer layer = new ResizeLayer(size, ResizeMode.Max); + var layer = new ResizeLayer(size, ResizeMode.Max); return this.Resize(layer); } @@ -368,7 +372,7 @@ namespace ImageProcessor percentage = 0; } - Contrast contrast = new Contrast { DynamicParameter = percentage }; + var contrast = new Contrast { DynamicParameter = percentage }; this.CurrentImageFormat.ApplyProcessor(contrast.ProcessImage, this); } @@ -388,7 +392,7 @@ namespace ImageProcessor { if (this.ShouldProcess) { - CropLayer cropLayer = new CropLayer(rectangle.Left, rectangle.Top, rectangle.Width, rectangle.Height, CropMode.Pixels); + var cropLayer = new CropLayer(rectangle.Left, rectangle.Top, rectangle.Width, rectangle.Height, CropMode.Pixels); return this.Crop(cropLayer); } @@ -399,7 +403,7 @@ namespace ImageProcessor /// Crops the current image to the given location and size. /// /// - /// The containing the coordinates and mode to crop the image with. + /// The containing the coordinates and mode to crop the image with. /// /// /// The current instance of the class. @@ -408,7 +412,7 @@ namespace ImageProcessor { if (this.ShouldProcess) { - Crop crop = new Crop { DynamicParameter = cropLayer }; + var crop = new Crop { DynamicParameter = cropLayer }; this.CurrentImageFormat.ApplyProcessor(crop.ProcessImage, this); } @@ -429,7 +433,7 @@ namespace ImageProcessor { if (this.ShouldProcess) { - Filter filter = new Filter { DynamicParameter = matrixFilter }; + var filter = new Filter { DynamicParameter = matrixFilter }; this.CurrentImageFormat.ApplyProcessor(filter.ProcessImage, this); } @@ -449,11 +453,11 @@ namespace ImageProcessor { if (this.ShouldProcess) { - RotateFlipType rotateFlipType = flipVertically == false - ? RotateFlipType.RotateNoneFlipX - : RotateFlipType.RotateNoneFlipY; + RotateFlipType rotateFlipType = flipVertically + ? RotateFlipType.RotateNoneFlipY + : RotateFlipType.RotateNoneFlipX; - Flip flip = new Flip { DynamicParameter = rotateFlipType }; + var flip = new Flip { DynamicParameter = rotateFlipType }; this.CurrentImageFormat.ApplyProcessor(flip.ProcessImage, this); } @@ -496,7 +500,7 @@ namespace ImageProcessor { if (this.ShouldProcess && size > 0) { - GaussianLayer layer = new GaussianLayer(size); + var layer = new GaussianLayer(size); return this.GaussianBlur(layer); } @@ -517,7 +521,7 @@ namespace ImageProcessor { if (this.ShouldProcess) { - GaussianBlur gaussianBlur = new GaussianBlur { DynamicParameter = gaussianLayer }; + var gaussianBlur = new GaussianBlur { DynamicParameter = gaussianLayer }; this.CurrentImageFormat.ApplyProcessor(gaussianBlur.ProcessImage, this); } @@ -543,7 +547,7 @@ namespace ImageProcessor { if (this.ShouldProcess && size > 0) { - GaussianLayer layer = new GaussianLayer(size); + var layer = new GaussianLayer(size); return this.GaussianSharpen(layer); } @@ -564,7 +568,7 @@ namespace ImageProcessor { if (this.ShouldProcess) { - GaussianSharpen gaussianSharpen = new GaussianSharpen { DynamicParameter = gaussianLayer }; + var gaussianSharpen = new GaussianSharpen { DynamicParameter = gaussianLayer }; this.CurrentImageFormat.ApplyProcessor(gaussianSharpen.ProcessImage, this); } @@ -607,7 +611,7 @@ namespace ImageProcessor int width = size.Width; int height = size.Height; - ResizeLayer resizeLayer = new ResizeLayer(new Size(width, height)); + var resizeLayer = new ResizeLayer(new Size(width, height)); return this.Resize(resizeLayer); } @@ -629,7 +633,7 @@ namespace ImageProcessor { var resizeSettings = new Dictionary { { "MaxWidth", resizeLayer.Size.Width.ToString("G") }, { "MaxHeight", resizeLayer.Size.Height.ToString("G") } }; - Resize resize = new Resize { DynamicParameter = resizeLayer, Settings = resizeSettings }; + var resize = new Resize { DynamicParameter = resizeLayer, Settings = resizeSettings }; this.CurrentImageFormat.ApplyProcessor(resize.ProcessImage, this); } @@ -655,7 +659,7 @@ namespace ImageProcessor degrees = 0; } - Rotate rotate = new Rotate { DynamicParameter = degrees }; + var rotate = new Rotate { DynamicParameter = degrees }; this.CurrentImageFormat.ApplyProcessor(rotate.ProcessImage, this); } @@ -680,7 +684,7 @@ namespace ImageProcessor roundedCornerLayer.Radius = 0; } - RoundedCorners roundedCorners = new RoundedCorners { DynamicParameter = roundedCornerLayer }; + var roundedCorners = new RoundedCorners { DynamicParameter = roundedCornerLayer }; this.CurrentImageFormat.ApplyProcessor(roundedCorners.ProcessImage, this); } @@ -707,7 +711,7 @@ namespace ImageProcessor percentage = 0; } - Saturation saturate = new Saturation { DynamicParameter = percentage }; + var saturate = new Saturation { DynamicParameter = percentage }; this.CurrentImageFormat.ApplyProcessor(saturate.ProcessImage, this); } @@ -727,7 +731,7 @@ namespace ImageProcessor { if (this.ShouldProcess) { - Tint tint = new Tint { DynamicParameter = color }; + var tint = new Tint { DynamicParameter = color }; this.CurrentImageFormat.ApplyProcessor(tint.ProcessImage, this); } @@ -747,7 +751,7 @@ namespace ImageProcessor { if (this.ShouldProcess) { - Vignette vignette = new Vignette + var vignette = new Vignette { DynamicParameter = color.HasValue && !color.Equals(Color.Transparent) ? color.Value @@ -774,7 +778,7 @@ namespace ImageProcessor { if (this.ShouldProcess) { - Watermark watermark = new Watermark { DynamicParameter = textLayer }; + var watermark = new Watermark { DynamicParameter = textLayer }; this.CurrentImageFormat.ApplyProcessor(watermark.ProcessImage, this); } @@ -796,7 +800,7 @@ namespace ImageProcessor if (this.ShouldProcess) { // ReSharper disable once AssignNullToNotNullAttribute - DirectoryInfo directoryInfo = new DirectoryInfo(Path.GetDirectoryName(filePath)); + var directoryInfo = new DirectoryInfo(Path.GetDirectoryName(filePath)); if (!directoryInfo.Exists) { directoryInfo.Create(); From b28d2b94b0a6a47f42c021c80e6a8c4c7accb453 Mon Sep 17 00:00:00 2001 From: Thomas Broust Date: Sat, 28 Jun 2014 22:53:25 +0200 Subject: [PATCH 13/20] Adds a few more unit tests Former-commit-id: c782e8168d8b9b186cc0855e46bd0478019ec5d9 --- .../ImageFactoryUnitTests.cs | 122 +++++++++++++++++- 1 file changed, 119 insertions(+), 3 deletions(-) diff --git a/src/ImageProcessor.UnitTests/ImageFactoryUnitTests.cs b/src/ImageProcessor.UnitTests/ImageFactoryUnitTests.cs index f81fd1c5b..ac5de24a4 100644 --- a/src/ImageProcessor.UnitTests/ImageFactoryUnitTests.cs +++ b/src/ImageProcessor.UnitTests/ImageFactoryUnitTests.cs @@ -74,7 +74,7 @@ namespace ImageProcessor.UnitTests /// Tests that a filter is really applied by checking that the image is modified /// [Test] - public void ApplyEffectAlpha() + public void TestApplyEffectAlpha() { foreach (var fileName in ListInputFiles()) { @@ -92,7 +92,7 @@ namespace ImageProcessor.UnitTests /// Tests that a filter is really applied by checking that the image is modified /// [Test] - public void ApplyEffectBrightness() + public void TestApplyEffectBrightness() { foreach (var fileName in ListInputFiles()) { @@ -106,11 +106,85 @@ namespace ImageProcessor.UnitTests } } + /// + /// Tests that a filter is really applied by checking that the image is modified + /// + [Test] + public void TestApplyEffectContrast() + { + foreach (var fileName in ListInputFiles()) + { + using (var imageFactory = new ImageFactory()) + { + imageFactory.Load(fileName); + var original = imageFactory.Image.Clone(); + imageFactory.Contrast(50); + Assert.AreNotEqual(original, imageFactory.Image); + } + } + } + + /// + /// Tests that all filters can be applied + /// + [Test] + public void TestApplyEffectFilter() + { + foreach (var fileName in ListInputFiles()) + { + using (var imageFactory = new ImageFactory()) + { + imageFactory.Load(fileName); + var original = imageFactory.Image.Clone(); + + imageFactory.Filter(Imaging.Filters.MatrixFilters.BlackWhite); + Assert.AreNotEqual(original, imageFactory.Image); + imageFactory.Reset(); + + imageFactory.Filter(Imaging.Filters.MatrixFilters.Comic); + Assert.AreNotEqual(original, imageFactory.Image); + imageFactory.Reset(); + + imageFactory.Filter(Imaging.Filters.MatrixFilters.Gotham); + Assert.AreNotEqual(original, imageFactory.Image); + imageFactory.Reset(); + + imageFactory.Filter(Imaging.Filters.MatrixFilters.GreyScale); + Assert.AreNotEqual(original, imageFactory.Image); + imageFactory.Reset(); + + imageFactory.Filter(Imaging.Filters.MatrixFilters.HiSatch); + Assert.AreNotEqual(original, imageFactory.Image); + imageFactory.Reset(); + + imageFactory.Filter(Imaging.Filters.MatrixFilters.Invert); + Assert.AreNotEqual(original, imageFactory.Image); + imageFactory.Reset(); + + imageFactory.Filter(Imaging.Filters.MatrixFilters.Lomograph); + Assert.AreNotEqual(original, imageFactory.Image); + imageFactory.Reset(); + + imageFactory.Filter(Imaging.Filters.MatrixFilters.LoSatch); + Assert.AreNotEqual(original, imageFactory.Image); + imageFactory.Reset(); + + imageFactory.Filter(Imaging.Filters.MatrixFilters.Polaroid); + Assert.AreNotEqual(original, imageFactory.Image); + imageFactory.Reset(); + + imageFactory.Filter(Imaging.Filters.MatrixFilters.Sepia); + Assert.AreNotEqual(original, imageFactory.Image); + imageFactory.Reset(); + } + } + } + /// /// Tests that the image is well resized using constraints /// [Test] - public void ApplyConstraints() + public void TestResizeConstraints() { const int maxSize = 200; foreach (var fileName in ListInputFiles()) @@ -126,5 +200,47 @@ namespace ImageProcessor.UnitTests } } } + + /// + /// Tests that the image is well cropped + /// + [Test] + public void TestCrop() + { + const int maxSize = 20; + foreach (var fileName in ListInputFiles()) + { + using (var imageFactory = new ImageFactory()) + { + imageFactory.Load(fileName); + var original = imageFactory.Image.Clone(); + imageFactory.Crop(new System.Drawing.Rectangle(0, 0, maxSize, maxSize)); + Assert.AreNotEqual(original, imageFactory.Image); + Assert.AreEqual(maxSize, imageFactory.Image.Width); + Assert.LessOrEqual(maxSize, imageFactory.Image.Height); + } + } + } + + /// + /// Tests that the image is well cropped + /// + [Test] + public void TestCropWithCropLayer() + { + const int maxSize = 20; + foreach (var fileName in ListInputFiles()) + { + using (var imageFactory = new ImageFactory()) + { + imageFactory.Load(fileName); + var original = imageFactory.Image.Clone(); + imageFactory.Crop(new Imaging.CropLayer(0, 0, maxSize, maxSize, Imaging.CropMode.Pixels)); + Assert.AreNotEqual(original, imageFactory.Image); + Assert.AreEqual(maxSize, imageFactory.Image.Width); + Assert.LessOrEqual(maxSize, imageFactory.Image.Height); + } + } + } } } \ No newline at end of file From bfa25f7473c5c5ccad09f562fb3589aa3d0e18e4 Mon Sep 17 00:00:00 2001 From: Thomas Broust Date: Sat, 28 Jun 2014 23:11:58 +0200 Subject: [PATCH 14/20] Adds a few more unit tests Former-commit-id: bca6ad3548ecf57e56eb416dcfbfd002b725b733 --- .../ImageFactoryUnitTests.cs | 62 +++++++++++++++++++ 1 file changed, 62 insertions(+) diff --git a/src/ImageProcessor.UnitTests/ImageFactoryUnitTests.cs b/src/ImageProcessor.UnitTests/ImageFactoryUnitTests.cs index ac5de24a4..7dd09e078 100644 --- a/src/ImageProcessor.UnitTests/ImageFactoryUnitTests.cs +++ b/src/ImageProcessor.UnitTests/ImageFactoryUnitTests.cs @@ -124,6 +124,42 @@ namespace ImageProcessor.UnitTests } } + /// + /// Tests that a filter is really applied by checking that the image is modified + /// + [Test] + public void TestApplyEffectBlur() + { + foreach (var fileName in ListInputFiles()) + { + using (var imageFactory = new ImageFactory()) + { + imageFactory.Load(fileName); + var original = imageFactory.Image.Clone(); + imageFactory.GaussianBlur(5); + Assert.AreNotEqual(original, imageFactory.Image); + } + } + } + + /// + /// Tests that a filter is really applied by checking that the image is modified + /// + [Test] + public void TestApplyEffectBlurWithLayer() + { + foreach (var fileName in ListInputFiles()) + { + using (var imageFactory = new ImageFactory()) + { + imageFactory.Load(fileName); + var original = imageFactory.Image.Clone(); + imageFactory.GaussianBlur(new Imaging.GaussianLayer() { Sigma = 10, Size = 5, Threshold = 2 }); + Assert.AreNotEqual(original, imageFactory.Image); + } + } + } + /// /// Tests that all filters can be applied /// @@ -242,5 +278,31 @@ namespace ImageProcessor.UnitTests } } } + + /// + /// Tests that the image is flipped + /// + [Test] + public void TestFlip() + { + foreach (var fileName in ListInputFiles()) + { + using (var imageFactory = new ImageFactory()) + { + imageFactory.Load(fileName); + var original = (System.Drawing.Image)imageFactory.Image.Clone(); + imageFactory.Flip(true); + Assert.AreNotEqual(original, imageFactory.Image); + Assert.AreEqual(original.Width, imageFactory.Image.Width); + Assert.AreEqual(original.Height, imageFactory.Image.Height); + imageFactory.Reset(); + + imageFactory.Flip(false); + Assert.AreNotEqual(original, imageFactory.Image); + Assert.AreEqual(original.Width, imageFactory.Image.Width); + Assert.AreEqual(original.Height, imageFactory.Image.Height); + } + } + } } } \ No newline at end of file From f70dd8112fcfd8fb1cb8d2560c7af4045b48fe97 Mon Sep 17 00:00:00 2001 From: Thomas Broust Date: Sat, 28 Jun 2014 23:22:35 +0200 Subject: [PATCH 15/20] Adds a few more unit tests Former-commit-id: ccb39e91e174833342bf502d6f12dc75b149c0bf --- .../ImageFactoryUnitTests.cs | 82 ++++++++++++++++++- 1 file changed, 79 insertions(+), 3 deletions(-) diff --git a/src/ImageProcessor.UnitTests/ImageFactoryUnitTests.cs b/src/ImageProcessor.UnitTests/ImageFactoryUnitTests.cs index 7dd09e078..60db9a8ee 100644 --- a/src/ImageProcessor.UnitTests/ImageFactoryUnitTests.cs +++ b/src/ImageProcessor.UnitTests/ImageFactoryUnitTests.cs @@ -154,7 +154,43 @@ namespace ImageProcessor.UnitTests { imageFactory.Load(fileName); var original = imageFactory.Image.Clone(); - imageFactory.GaussianBlur(new Imaging.GaussianLayer() { Sigma = 10, Size = 5, Threshold = 2 }); + imageFactory.GaussianBlur(new Imaging.GaussianLayer { Sigma = 10, Size = 5, Threshold = 2 }); + Assert.AreNotEqual(original, imageFactory.Image); + } + } + } + + /// + /// Tests that a filter is really applied by checking that the image is modified + /// + [Test] + public void TestApplyEffectSharpen() + { + foreach (var fileName in ListInputFiles()) + { + using (var imageFactory = new ImageFactory()) + { + imageFactory.Load(fileName); + var original = imageFactory.Image.Clone(); + imageFactory.GaussianSharpen(5); + Assert.AreNotEqual(original, imageFactory.Image); + } + } + } + + /// + /// Tests that a filter is really applied by checking that the image is modified + /// + [Test] + public void TestApplyEffectSharpenWithLayer() + { + foreach (var fileName in ListInputFiles()) + { + using (var imageFactory = new ImageFactory()) + { + imageFactory.Load(fileName); + var original = imageFactory.Image.Clone(); + imageFactory.GaussianSharpen(new Imaging.GaussianLayer { Sigma = 10, Size = 5, Threshold = 2 }); Assert.AreNotEqual(original, imageFactory.Image); } } @@ -228,9 +264,7 @@ namespace ImageProcessor.UnitTests using (var imageFactory = new ImageFactory()) { imageFactory.Load(fileName); - var original = imageFactory.Image.Clone(); imageFactory.Constrain(new System.Drawing.Size(maxSize, maxSize)); - Assert.AreNotEqual(original, imageFactory.Image); Assert.LessOrEqual(imageFactory.Image.Width, maxSize); Assert.LessOrEqual(imageFactory.Image.Height, maxSize); } @@ -304,5 +338,47 @@ namespace ImageProcessor.UnitTests } } } + + /// + /// Tests that the image is resized + /// + [Test] + public void TestResize() + { + const int newSize = 150; + foreach (var fileName in ListInputFiles()) + { + using (var imageFactory = new ImageFactory()) + { + imageFactory.Load(fileName); + imageFactory.Resize(new System.Drawing.Size(newSize, newSize)); + Assert.AreEqual(newSize, imageFactory.Image.Width); + Assert.AreEqual(newSize, imageFactory.Image.Height); + } + } + } + + /// + /// Tests that the image is resized + /// + [Test] + public void TestResizeWithLayer() + { + const int newSize = 150; + foreach (var fileName in ListInputFiles()) + { + using (var imageFactory = new ImageFactory()) + { + imageFactory.Load(fileName); + imageFactory.Resize(new Imaging.ResizeLayer( + new System.Drawing.Size(newSize, newSize), + Imaging.ResizeMode.Stretch, + Imaging.AnchorPosition.Left, + true)); + Assert.AreEqual(newSize, imageFactory.Image.Width); + Assert.AreEqual(newSize, imageFactory.Image.Height); + } + } + } } } \ No newline at end of file From 601c7b452196b192860f4b8d6ee42be5ea4e0d07 Mon Sep 17 00:00:00 2001 From: Thomas Broust Date: Sun, 29 Jun 2014 00:37:38 +0200 Subject: [PATCH 16/20] Yet a few other unit tests Former-commit-id: cfc586b9f02332ec65eaea1ba0c89b6b4be6b27e --- .../ImageFactoryUnitTests.cs | 182 ++++++++++++++---- 1 file changed, 146 insertions(+), 36 deletions(-) diff --git a/src/ImageProcessor.UnitTests/ImageFactoryUnitTests.cs b/src/ImageProcessor.UnitTests/ImageFactoryUnitTests.cs index 60db9a8ee..d868b2245 100644 --- a/src/ImageProcessor.UnitTests/ImageFactoryUnitTests.cs +++ b/src/ImageProcessor.UnitTests/ImageFactoryUnitTests.cs @@ -11,8 +11,8 @@ namespace ImageProcessor.UnitTests { using System; - using System.IO; using System.Collections.Generic; + using System.IO; using NUnit.Framework; /// @@ -21,15 +21,6 @@ namespace ImageProcessor.UnitTests [TestFixture] public class ImageFactoryUnitTests { - /// - /// Lists the input files in the Images folder - /// - /// The list of files. - private static IEnumerable ListInputFiles() - { - return Directory.GetFiles("./Images"); - } - /// /// Tests the loading of image from a file /// @@ -45,10 +36,9 @@ namespace ImageProcessor.UnitTests Assert.IsNotNull(imageFactory.Image); } } - } - /// > + /// /// Tests the loading of image from a memory stream /// [Test] @@ -124,6 +114,84 @@ namespace ImageProcessor.UnitTests } } + /// + /// Tests that a filter is really applied by checking that the image is modified + /// + [Test] + public void TestApplyEffectSaturation() + { + foreach (var fileName in ListInputFiles()) + { + using (var imageFactory = new ImageFactory()) + { + imageFactory.Load(fileName); + var original = imageFactory.Image.Clone(); + imageFactory.Saturation(50); + Assert.AreNotEqual(original, imageFactory.Image); + } + } + } + + /// + /// Tests that a filter is really applied by checking that the image is modified + /// + [Test] + public void TestApplyEffectTint() + { + foreach (var fileName in ListInputFiles()) + { + using (var imageFactory = new ImageFactory()) + { + imageFactory.Load(fileName); + var original = imageFactory.Image.Clone(); + imageFactory.Tint(System.Drawing.Color.FromKnownColor(System.Drawing.KnownColor.AliceBlue)); + Assert.AreNotEqual(original, imageFactory.Image); + } + } + } + + /// + /// Tests that a filter is really applied by checking that the image is modified + /// + [Test] + public void TestApplyEffectVignette() + { + foreach (var fileName in ListInputFiles()) + { + using (var imageFactory = new ImageFactory()) + { + imageFactory.Load(fileName); + var original = imageFactory.Image.Clone(); + imageFactory.Vignette(System.Drawing.Color.FromKnownColor(System.Drawing.KnownColor.AliceBlue)); + Assert.AreNotEqual(original, imageFactory.Image); + } + } + } + + /// + /// Tests that a filter is really applied by checking that the image is modified + /// + [Test] + public void TestApplyEffectWatermark() + { + foreach (var fileName in ListInputFiles()) + { + using (var imageFactory = new ImageFactory()) + { + imageFactory.Load(fileName); + var original = imageFactory.Image.Clone(); + imageFactory.Watermark(new Imaging.TextLayer + { + Font = "Arial", + FontSize = 10, + Position = new System.Drawing.Point(10, 10), + Text = "Lorem ipsum dolor" + }); + Assert.AreNotEqual(original, imageFactory.Image); + } + } + } + /// /// Tests that a filter is really applied by checking that the image is modified /// @@ -252,21 +320,39 @@ namespace ImageProcessor.UnitTests } } + /// + /// Tests that a filter is really applied by checking that the image is modified + /// + [Test] + public void TestRoundedCorners() + { + foreach (var fileName in ListInputFiles()) + { + using (var imageFactory = new ImageFactory()) + { + imageFactory.Load(fileName); + var original = imageFactory.Image.Clone(); + imageFactory.RoundedCorners(new Imaging.RoundedCornerLayer(5, true, true, true, true)); + Assert.AreNotEqual(original, imageFactory.Image); + } + } + } + /// /// Tests that the image is well resized using constraints /// [Test] public void TestResizeConstraints() { - const int maxSize = 200; + const int MaxSize = 200; foreach (var fileName in ListInputFiles()) { using (var imageFactory = new ImageFactory()) { imageFactory.Load(fileName); - imageFactory.Constrain(new System.Drawing.Size(maxSize, maxSize)); - Assert.LessOrEqual(imageFactory.Image.Width, maxSize); - Assert.LessOrEqual(imageFactory.Image.Height, maxSize); + imageFactory.Constrain(new System.Drawing.Size(MaxSize, MaxSize)); + Assert.LessOrEqual(imageFactory.Image.Width, MaxSize); + Assert.LessOrEqual(imageFactory.Image.Height, MaxSize); } } } @@ -277,17 +363,17 @@ namespace ImageProcessor.UnitTests [Test] public void TestCrop() { - const int maxSize = 20; + const int MaxSize = 20; foreach (var fileName in ListInputFiles()) { using (var imageFactory = new ImageFactory()) { imageFactory.Load(fileName); var original = imageFactory.Image.Clone(); - imageFactory.Crop(new System.Drawing.Rectangle(0, 0, maxSize, maxSize)); + imageFactory.Crop(new System.Drawing.Rectangle(0, 0, MaxSize, MaxSize)); Assert.AreNotEqual(original, imageFactory.Image); - Assert.AreEqual(maxSize, imageFactory.Image.Width); - Assert.LessOrEqual(maxSize, imageFactory.Image.Height); + Assert.AreEqual(MaxSize, imageFactory.Image.Width); + Assert.LessOrEqual(MaxSize, imageFactory.Image.Height); } } } @@ -298,17 +384,17 @@ namespace ImageProcessor.UnitTests [Test] public void TestCropWithCropLayer() { - const int maxSize = 20; + const int MaxSize = 20; foreach (var fileName in ListInputFiles()) { using (var imageFactory = new ImageFactory()) { imageFactory.Load(fileName); var original = imageFactory.Image.Clone(); - imageFactory.Crop(new Imaging.CropLayer(0, 0, maxSize, maxSize, Imaging.CropMode.Pixels)); + imageFactory.Crop(new Imaging.CropLayer(0, 0, MaxSize, MaxSize, Imaging.CropMode.Pixels)); Assert.AreNotEqual(original, imageFactory.Image); - Assert.AreEqual(maxSize, imageFactory.Image.Width); - Assert.LessOrEqual(maxSize, imageFactory.Image.Height); + Assert.AreEqual(MaxSize, imageFactory.Image.Width); + Assert.LessOrEqual(MaxSize, imageFactory.Image.Height); } } } @@ -345,15 +431,15 @@ namespace ImageProcessor.UnitTests [Test] public void TestResize() { - const int newSize = 150; + const int NewSize = 150; foreach (var fileName in ListInputFiles()) { using (var imageFactory = new ImageFactory()) { imageFactory.Load(fileName); - imageFactory.Resize(new System.Drawing.Size(newSize, newSize)); - Assert.AreEqual(newSize, imageFactory.Image.Width); - Assert.AreEqual(newSize, imageFactory.Image.Height); + imageFactory.Resize(new System.Drawing.Size(NewSize, NewSize)); + Assert.AreEqual(NewSize, imageFactory.Image.Width); + Assert.AreEqual(NewSize, imageFactory.Image.Height); } } } @@ -364,21 +450,45 @@ namespace ImageProcessor.UnitTests [Test] public void TestResizeWithLayer() { - const int newSize = 150; + const int NewSize = 150; foreach (var fileName in ListInputFiles()) { using (var imageFactory = new ImageFactory()) { imageFactory.Load(fileName); - imageFactory.Resize(new Imaging.ResizeLayer( - new System.Drawing.Size(newSize, newSize), - Imaging.ResizeMode.Stretch, - Imaging.AnchorPosition.Left, - true)); - Assert.AreEqual(newSize, imageFactory.Image.Width); - Assert.AreEqual(newSize, imageFactory.Image.Height); + imageFactory.Resize(new Imaging.ResizeLayer(new System.Drawing.Size(NewSize, NewSize), Imaging.ResizeMode.Stretch, Imaging.AnchorPosition.Left)); + Assert.AreEqual(NewSize, imageFactory.Image.Width); + Assert.AreEqual(NewSize, imageFactory.Image.Height); } } } + + /// + /// Tests that the image is resized + /// + [Test] + public void TestRotate() + { + foreach (var fileName in ListInputFiles()) + { + using (var imageFactory = new ImageFactory()) + { + imageFactory.Load(fileName); + var original = (System.Drawing.Image)imageFactory.Image.Clone(); + imageFactory.Rotate(90); + Assert.AreEqual(original.Height, imageFactory.Image.Width); + Assert.AreEqual(original.Width, imageFactory.Image.Height); + } + } + } + + /// + /// Lists the input files in the Images folder + /// + /// The list of files. + private static IEnumerable ListInputFiles() + { + return Directory.GetFiles("./Images"); + } } } \ No newline at end of file From ec4274928e42f648529c102d7550b80f502e2146 Mon Sep 17 00:00:00 2001 From: Thomas Broust Date: Sun, 29 Jun 2014 00:41:53 +0200 Subject: [PATCH 17/20] Adds tests for saving the files Former-commit-id: 7893eb70f8315cf13da030fde6a4a3c9884f59aa --- .../ImageFactoryUnitTests.cs | 39 +++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/src/ImageProcessor.UnitTests/ImageFactoryUnitTests.cs b/src/ImageProcessor.UnitTests/ImageFactoryUnitTests.cs index d868b2245..880871cc7 100644 --- a/src/ImageProcessor.UnitTests/ImageFactoryUnitTests.cs +++ b/src/ImageProcessor.UnitTests/ImageFactoryUnitTests.cs @@ -60,6 +60,45 @@ namespace ImageProcessor.UnitTests } } + /// + /// Tests that the save method actually saves a file + /// + [Test] + public void TestSaveToDisk() + { + foreach (var fileName in ListInputFiles()) + { + var outputFileName = string.Format("./output/{0}", Path.GetFileName(fileName)); + using (var imageFactory = new ImageFactory()) + { + imageFactory.Load(fileName); + imageFactory.Save(outputFileName); + Assert.AreEqual(true, File.Exists(outputFileName)); + } + } + } + + /// + /// Tests that the save method actually writes to memory + /// + [Test] + public void TestSaveToMemory() + { + foreach (var fileName in ListInputFiles()) + { + using (var imageFactory = new ImageFactory()) + { + imageFactory.Load(fileName); + using (var s = new MemoryStream()) + { + imageFactory.Save(s); + s.Seek(0, SeekOrigin.Begin); + Assert.AreEqual(true, s.Capacity > 0); + } + } + } + } + /// /// Tests that a filter is really applied by checking that the image is modified /// From abdc216549afee230d47d28e91219d6a9d601421 Mon Sep 17 00:00:00 2001 From: Thomas Broust Date: Sun, 29 Jun 2014 11:09:25 +0200 Subject: [PATCH 18/20] Removes unnecessary images Former-commit-id: b7abba38c2ce512bdd6706af08fdabd25537f8b7 --- .../Images/Chrysanthemum.jpg.REMOVED.git-id | 1 - src/ImageProcessor.UnitTests/Images/Desert.jpg.REMOVED.git-id | 1 - src/ImageProcessor.UnitTests/Images/Penguins.bmp.REMOVED.git-id | 1 - src/ImageProcessor.UnitTests/Images/Penguins.gif.REMOVED.git-id | 1 - src/ImageProcessor.UnitTests/Images/cmyk.png.REMOVED.git-id | 1 - 5 files changed, 5 deletions(-) delete mode 100644 src/ImageProcessor.UnitTests/Images/Chrysanthemum.jpg.REMOVED.git-id delete mode 100644 src/ImageProcessor.UnitTests/Images/Desert.jpg.REMOVED.git-id delete mode 100644 src/ImageProcessor.UnitTests/Images/Penguins.bmp.REMOVED.git-id delete mode 100644 src/ImageProcessor.UnitTests/Images/Penguins.gif.REMOVED.git-id delete mode 100644 src/ImageProcessor.UnitTests/Images/cmyk.png.REMOVED.git-id diff --git a/src/ImageProcessor.UnitTests/Images/Chrysanthemum.jpg.REMOVED.git-id b/src/ImageProcessor.UnitTests/Images/Chrysanthemum.jpg.REMOVED.git-id deleted file mode 100644 index d067665c9..000000000 --- a/src/ImageProcessor.UnitTests/Images/Chrysanthemum.jpg.REMOVED.git-id +++ /dev/null @@ -1 +0,0 @@ -757c2a628dd03b1cbe4b3ef07c153897a702b57a \ No newline at end of file diff --git a/src/ImageProcessor.UnitTests/Images/Desert.jpg.REMOVED.git-id b/src/ImageProcessor.UnitTests/Images/Desert.jpg.REMOVED.git-id deleted file mode 100644 index 228aac3ab..000000000 --- a/src/ImageProcessor.UnitTests/Images/Desert.jpg.REMOVED.git-id +++ /dev/null @@ -1 +0,0 @@ -0b88c91336ff8073f34d21ccd683a01f0e0995da \ No newline at end of file diff --git a/src/ImageProcessor.UnitTests/Images/Penguins.bmp.REMOVED.git-id b/src/ImageProcessor.UnitTests/Images/Penguins.bmp.REMOVED.git-id deleted file mode 100644 index 74f69293c..000000000 --- a/src/ImageProcessor.UnitTests/Images/Penguins.bmp.REMOVED.git-id +++ /dev/null @@ -1 +0,0 @@ -8150b46ab27c62ba51aaba551eef3f1a30f08de9 \ No newline at end of file diff --git a/src/ImageProcessor.UnitTests/Images/Penguins.gif.REMOVED.git-id b/src/ImageProcessor.UnitTests/Images/Penguins.gif.REMOVED.git-id deleted file mode 100644 index ce873d473..000000000 --- a/src/ImageProcessor.UnitTests/Images/Penguins.gif.REMOVED.git-id +++ /dev/null @@ -1 +0,0 @@ -6ad3b846d4697584ff601ac481b14a4d3bbb5736 \ No newline at end of file diff --git a/src/ImageProcessor.UnitTests/Images/cmyk.png.REMOVED.git-id b/src/ImageProcessor.UnitTests/Images/cmyk.png.REMOVED.git-id deleted file mode 100644 index aeca7b93c..000000000 --- a/src/ImageProcessor.UnitTests/Images/cmyk.png.REMOVED.git-id +++ /dev/null @@ -1 +0,0 @@ -db4d55a332254cd6b41336c06f207682bf5a966f \ No newline at end of file From ee0317ddee99e9d6be7f5e9e478ca69dc79b3f0c Mon Sep 17 00:00:00 2001 From: Thomas Broust Date: Sun, 29 Jun 2014 11:33:05 +0200 Subject: [PATCH 19/20] Filters the source images a bit, in order to speed up the unit tests + descriptive name Former-commit-id: eb53b2d6eef84df94cefa75642ac5be52af4e9e2 --- .../ImageProcessor.UnitTests.csproj | 132 ++++-------------- .../Images/autorotate.jpg.REMOVED.git-id | 1 + .../cmyk-profile-euroscale.jpg.REMOVED.git-id | 1 + .../Images/cmyk.jpg.REMOVED.git-id | 1 + .../color-vision-test.gif.REMOVED.git-id | 1 + .../Images/exif-Tulips.jpg.REMOVED.git-id | 1 + .../Images/exif-rocks.jpg.REMOVED.git-id | 1 + .../format-Penguins-8bit.png.REMOVED.git-id | 1 + .../Images/format-Penguins.bmp.REMOVED.git-id | 1 + .../Images/format-Penguins.gif.REMOVED.git-id | 1 + .../Images/format-Penguins.jpg.REMOVED.git-id | 1 + .../Images/format-Penguins.png.REMOVED.git-id | 1 + .../Images/format-Penguins.tif.REMOVED.git-id | 1 + .../Images/format-animated.gif | 3 + .../Images/hi-color.png | 3 + .../Images/hi-contrast.jpg | 3 + .../Images/hi-saturation.jpg | 3 + .../profile-adobe-rgb.jpg.REMOVED.git-id | 1 + .../Images/profile-srgb.jpg.REMOVED.git-id | 1 + .../Images/size-Penguins-200.jpg | 3 + .../Images/text-over-transparent.png | 3 + .../Images/udendørs.jpg.REMOVED.git-id | 1 + 22 files changed, 57 insertions(+), 108 deletions(-) create mode 100644 src/ImageProcessor.UnitTests/Images/autorotate.jpg.REMOVED.git-id create mode 100644 src/ImageProcessor.UnitTests/Images/cmyk-profile-euroscale.jpg.REMOVED.git-id create mode 100644 src/ImageProcessor.UnitTests/Images/cmyk.jpg.REMOVED.git-id create mode 100644 src/ImageProcessor.UnitTests/Images/color-vision-test.gif.REMOVED.git-id create mode 100644 src/ImageProcessor.UnitTests/Images/exif-Tulips.jpg.REMOVED.git-id create mode 100644 src/ImageProcessor.UnitTests/Images/exif-rocks.jpg.REMOVED.git-id create mode 100644 src/ImageProcessor.UnitTests/Images/format-Penguins-8bit.png.REMOVED.git-id create mode 100644 src/ImageProcessor.UnitTests/Images/format-Penguins.bmp.REMOVED.git-id create mode 100644 src/ImageProcessor.UnitTests/Images/format-Penguins.gif.REMOVED.git-id create mode 100644 src/ImageProcessor.UnitTests/Images/format-Penguins.jpg.REMOVED.git-id create mode 100644 src/ImageProcessor.UnitTests/Images/format-Penguins.png.REMOVED.git-id create mode 100644 src/ImageProcessor.UnitTests/Images/format-Penguins.tif.REMOVED.git-id create mode 100644 src/ImageProcessor.UnitTests/Images/format-animated.gif create mode 100644 src/ImageProcessor.UnitTests/Images/hi-color.png create mode 100644 src/ImageProcessor.UnitTests/Images/hi-contrast.jpg create mode 100644 src/ImageProcessor.UnitTests/Images/hi-saturation.jpg create mode 100644 src/ImageProcessor.UnitTests/Images/profile-adobe-rgb.jpg.REMOVED.git-id create mode 100644 src/ImageProcessor.UnitTests/Images/profile-srgb.jpg.REMOVED.git-id create mode 100644 src/ImageProcessor.UnitTests/Images/size-Penguins-200.jpg create mode 100644 src/ImageProcessor.UnitTests/Images/text-over-transparent.png create mode 100644 src/ImageProcessor.UnitTests/Images/udendørs.jpg.REMOVED.git-id diff --git a/src/ImageProcessor.UnitTests/ImageProcessor.UnitTests.csproj b/src/ImageProcessor.UnitTests/ImageProcessor.UnitTests.csproj index 4bb9bf77f..726d0988e 100644 --- a/src/ImageProcessor.UnitTests/ImageProcessor.UnitTests.csproj +++ b/src/ImageProcessor.UnitTests/ImageProcessor.UnitTests.csproj @@ -58,114 +58,27 @@ - - 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-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 - + + + + + + + + + + + + + + + + + + + + + @@ -175,4 +88,7 @@ + + + \ No newline at end of file diff --git a/src/ImageProcessor.UnitTests/Images/autorotate.jpg.REMOVED.git-id b/src/ImageProcessor.UnitTests/Images/autorotate.jpg.REMOVED.git-id new file mode 100644 index 000000000..19785c8e5 --- /dev/null +++ b/src/ImageProcessor.UnitTests/Images/autorotate.jpg.REMOVED.git-id @@ -0,0 +1 @@ +85a8ae18f9955def2b42ba9240bce4de1bfe5781 \ No newline at end of file diff --git a/src/ImageProcessor.UnitTests/Images/cmyk-profile-euroscale.jpg.REMOVED.git-id b/src/ImageProcessor.UnitTests/Images/cmyk-profile-euroscale.jpg.REMOVED.git-id new file mode 100644 index 000000000..7747bdaae --- /dev/null +++ b/src/ImageProcessor.UnitTests/Images/cmyk-profile-euroscale.jpg.REMOVED.git-id @@ -0,0 +1 @@ +13492524f9d984c12adfe6183a4c1d92fb11ec4e \ No newline at end of file diff --git a/src/ImageProcessor.UnitTests/Images/cmyk.jpg.REMOVED.git-id b/src/ImageProcessor.UnitTests/Images/cmyk.jpg.REMOVED.git-id new file mode 100644 index 000000000..30b05146b --- /dev/null +++ b/src/ImageProcessor.UnitTests/Images/cmyk.jpg.REMOVED.git-id @@ -0,0 +1 @@ +ed725726e4ac1ffeac821664af14865a66fa933f \ No newline at end of file diff --git a/src/ImageProcessor.UnitTests/Images/color-vision-test.gif.REMOVED.git-id b/src/ImageProcessor.UnitTests/Images/color-vision-test.gif.REMOVED.git-id new file mode 100644 index 000000000..5c4f4195d --- /dev/null +++ b/src/ImageProcessor.UnitTests/Images/color-vision-test.gif.REMOVED.git-id @@ -0,0 +1 @@ +35a926115b13b61dc37308f8d903b42d14f92924 \ No newline at end of file diff --git a/src/ImageProcessor.UnitTests/Images/exif-Tulips.jpg.REMOVED.git-id b/src/ImageProcessor.UnitTests/Images/exif-Tulips.jpg.REMOVED.git-id new file mode 100644 index 000000000..84b9aff85 --- /dev/null +++ b/src/ImageProcessor.UnitTests/Images/exif-Tulips.jpg.REMOVED.git-id @@ -0,0 +1 @@ +54c51eb6a86f31a42433b8167470fb18dad32c7d \ No newline at end of file diff --git a/src/ImageProcessor.UnitTests/Images/exif-rocks.jpg.REMOVED.git-id b/src/ImageProcessor.UnitTests/Images/exif-rocks.jpg.REMOVED.git-id new file mode 100644 index 000000000..41c6c25df --- /dev/null +++ b/src/ImageProcessor.UnitTests/Images/exif-rocks.jpg.REMOVED.git-id @@ -0,0 +1 @@ +33b6912af301bf216ee81d82b2c3ce6c49e03021 \ No newline at end of file diff --git a/src/ImageProcessor.UnitTests/Images/format-Penguins-8bit.png.REMOVED.git-id b/src/ImageProcessor.UnitTests/Images/format-Penguins-8bit.png.REMOVED.git-id new file mode 100644 index 000000000..aa9a70e0f --- /dev/null +++ b/src/ImageProcessor.UnitTests/Images/format-Penguins-8bit.png.REMOVED.git-id @@ -0,0 +1 @@ +c3d556d9d486b8b8b49cdbcc9c12a9d3a2db4c1f \ No newline at end of file diff --git a/src/ImageProcessor.UnitTests/Images/format-Penguins.bmp.REMOVED.git-id b/src/ImageProcessor.UnitTests/Images/format-Penguins.bmp.REMOVED.git-id new file mode 100644 index 000000000..74f69293c --- /dev/null +++ b/src/ImageProcessor.UnitTests/Images/format-Penguins.bmp.REMOVED.git-id @@ -0,0 +1 @@ +8150b46ab27c62ba51aaba551eef3f1a30f08de9 \ No newline at end of file diff --git a/src/ImageProcessor.UnitTests/Images/format-Penguins.gif.REMOVED.git-id b/src/ImageProcessor.UnitTests/Images/format-Penguins.gif.REMOVED.git-id new file mode 100644 index 000000000..ce873d473 --- /dev/null +++ b/src/ImageProcessor.UnitTests/Images/format-Penguins.gif.REMOVED.git-id @@ -0,0 +1 @@ +6ad3b846d4697584ff601ac481b14a4d3bbb5736 \ No newline at end of file diff --git a/src/ImageProcessor.UnitTests/Images/format-Penguins.jpg.REMOVED.git-id b/src/ImageProcessor.UnitTests/Images/format-Penguins.jpg.REMOVED.git-id new file mode 100644 index 000000000..ad4371113 --- /dev/null +++ b/src/ImageProcessor.UnitTests/Images/format-Penguins.jpg.REMOVED.git-id @@ -0,0 +1 @@ +030ab8a685bebb796c24cc710edd9e69859164f6 \ No newline at end of file diff --git a/src/ImageProcessor.UnitTests/Images/format-Penguins.png.REMOVED.git-id b/src/ImageProcessor.UnitTests/Images/format-Penguins.png.REMOVED.git-id new file mode 100644 index 000000000..78062a0e7 --- /dev/null +++ b/src/ImageProcessor.UnitTests/Images/format-Penguins.png.REMOVED.git-id @@ -0,0 +1 @@ +a2c796fbb7de948230a22982ab74892891dd5198 \ No newline at end of file diff --git a/src/ImageProcessor.UnitTests/Images/format-Penguins.tif.REMOVED.git-id b/src/ImageProcessor.UnitTests/Images/format-Penguins.tif.REMOVED.git-id new file mode 100644 index 000000000..5f7b97e71 --- /dev/null +++ b/src/ImageProcessor.UnitTests/Images/format-Penguins.tif.REMOVED.git-id @@ -0,0 +1 @@ +c789aaec248568c24394b05c02db4233e0c5a4eb \ No newline at end of file diff --git a/src/ImageProcessor.UnitTests/Images/format-animated.gif b/src/ImageProcessor.UnitTests/Images/format-animated.gif new file mode 100644 index 000000000..ac36f6f25 --- /dev/null +++ b/src/ImageProcessor.UnitTests/Images/format-animated.gif @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6212724b3e94908939823d0753b4307923b65d7a27f51823dd3ba7656543349c +size 22525 diff --git a/src/ImageProcessor.UnitTests/Images/hi-color.png b/src/ImageProcessor.UnitTests/Images/hi-color.png new file mode 100644 index 000000000..a9de4cc09 --- /dev/null +++ b/src/ImageProcessor.UnitTests/Images/hi-color.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:977cc9071257655c9923d267ea5bd417b69754367c2f1aa8765247b68e2bb878 +size 1539 diff --git a/src/ImageProcessor.UnitTests/Images/hi-contrast.jpg b/src/ImageProcessor.UnitTests/Images/hi-contrast.jpg new file mode 100644 index 000000000..98ac863a2 --- /dev/null +++ b/src/ImageProcessor.UnitTests/Images/hi-contrast.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c0ce9e02f2a4663a0a0ed433d5594be87b3fa0387bc8335e80f84d59c34aa424 +size 51058 diff --git a/src/ImageProcessor.UnitTests/Images/hi-saturation.jpg b/src/ImageProcessor.UnitTests/Images/hi-saturation.jpg new file mode 100644 index 000000000..b56f9a83c --- /dev/null +++ b/src/ImageProcessor.UnitTests/Images/hi-saturation.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6b2012b2eda13a531645c287c254ae5de0e9070368cb4bc806f48314e0464ccd +size 33850 diff --git a/src/ImageProcessor.UnitTests/Images/profile-adobe-rgb.jpg.REMOVED.git-id b/src/ImageProcessor.UnitTests/Images/profile-adobe-rgb.jpg.REMOVED.git-id new file mode 100644 index 000000000..4ffbf7a8a --- /dev/null +++ b/src/ImageProcessor.UnitTests/Images/profile-adobe-rgb.jpg.REMOVED.git-id @@ -0,0 +1 @@ +e29f32091aa13a5b047ccd960f3dc6da9656c84b \ No newline at end of file diff --git a/src/ImageProcessor.UnitTests/Images/profile-srgb.jpg.REMOVED.git-id b/src/ImageProcessor.UnitTests/Images/profile-srgb.jpg.REMOVED.git-id new file mode 100644 index 000000000..f409bc82b --- /dev/null +++ b/src/ImageProcessor.UnitTests/Images/profile-srgb.jpg.REMOVED.git-id @@ -0,0 +1 @@ +ab9deaa737f9db9bf0f563e7843ba9b7981cec86 \ No newline at end of file diff --git a/src/ImageProcessor.UnitTests/Images/size-Penguins-200.jpg b/src/ImageProcessor.UnitTests/Images/size-Penguins-200.jpg new file mode 100644 index 000000000..07605996f --- /dev/null +++ b/src/ImageProcessor.UnitTests/Images/size-Penguins-200.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:672de68017f17260126901065f1c6ade2b2981d33dea0dea1606bf7cfb6fdcf3 +size 10119 diff --git a/src/ImageProcessor.UnitTests/Images/text-over-transparent.png b/src/ImageProcessor.UnitTests/Images/text-over-transparent.png new file mode 100644 index 000000000..33d4962bc --- /dev/null +++ b/src/ImageProcessor.UnitTests/Images/text-over-transparent.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2322d8dd81df86b8135d399743ea758ad26d6b2ccdcc704e2687ae72d0c187e7 +size 7317 diff --git a/src/ImageProcessor.UnitTests/Images/udendørs.jpg.REMOVED.git-id b/src/ImageProcessor.UnitTests/Images/udendørs.jpg.REMOVED.git-id new file mode 100644 index 000000000..0db1445a2 --- /dev/null +++ b/src/ImageProcessor.UnitTests/Images/udendørs.jpg.REMOVED.git-id @@ -0,0 +1 @@ +4d040d9aa3519b3d2303419d1f03eebebf88e956 \ No newline at end of file From 43ac2ffe50ef130398678621035bd57403c620ca Mon Sep 17 00:00:00 2001 From: Thomas Broust Date: Sun, 29 Jun 2014 11:57:53 +0200 Subject: [PATCH 20/20] Fixes test image includes Former-commit-id: ece5f07535519335d8e992d5831440c9ed9600be --- .../ImageProcessor.UnitTests.csproj | 84 ++++++++++++++----- 1 file changed, 63 insertions(+), 21 deletions(-) diff --git a/src/ImageProcessor.UnitTests/ImageProcessor.UnitTests.csproj b/src/ImageProcessor.UnitTests/ImageProcessor.UnitTests.csproj index 726d0988e..4fbcc99b6 100644 --- a/src/ImageProcessor.UnitTests/ImageProcessor.UnitTests.csproj +++ b/src/ImageProcessor.UnitTests/ImageProcessor.UnitTests.csproj @@ -43,7 +43,9 @@ - + + PreserveNewest + @@ -59,26 +61,66 @@ - - - - - - - - - - - - - - - - - - - - + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest +