diff --git a/.gitignore b/.gitignore index ae6765a03..21563da17 100644 --- a/.gitignore +++ b/.gitignore @@ -172,4 +172,9 @@ build/TestResult.xml *.db _site/ -.vs/config/applicationhost.config \ No newline at end of file +.vs/config/applicationhost.config + +**/node_modules +**/node_modules/* +project.lock.json +src/ImageProcessor/project.lock.json \ No newline at end of file diff --git a/ImageProcessor.sln b/ImageProcessor.sln index 75e092892..35ec0a49d 100644 --- a/ImageProcessor.sln +++ b/ImageProcessor.sln @@ -3,9 +3,9 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 14 VisualStudioVersion = 14.0.23107.0 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ImageProcessor", "src\ImageProcessor\ImageProcessor.csproj", "{8047C4AC-7097-4DE4-B00D-6D55EBCF1D36}" +Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "ImageProcessor", "src\ImageProcessor\ImageProcessor.xproj", "{2AA31A1F-142C-43F4-8687-09ABCA4B3A26}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ImageProcessor.Tests", "tests\ImageProcessor.Tests\ImageProcessor.Tests.csproj", "{1741DC66-5404-4B15-AE58-B7721F1568A4}" +Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "ImageProcessor.Tests", "tests\ImageProcessor.Tests\ImageProcessor.Tests.xproj", "{F836E8E6-B4D9-4208-8346-140C74678B91}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -13,14 +13,14 @@ Global Release|Any CPU = Release|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {8047C4AC-7097-4DE4-B00D-6D55EBCF1D36}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {8047C4AC-7097-4DE4-B00D-6D55EBCF1D36}.Debug|Any CPU.Build.0 = Debug|Any CPU - {8047C4AC-7097-4DE4-B00D-6D55EBCF1D36}.Release|Any CPU.ActiveCfg = Release|Any CPU - {8047C4AC-7097-4DE4-B00D-6D55EBCF1D36}.Release|Any CPU.Build.0 = Release|Any CPU - {1741DC66-5404-4B15-AE58-B7721F1568A4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {1741DC66-5404-4B15-AE58-B7721F1568A4}.Debug|Any CPU.Build.0 = Debug|Any CPU - {1741DC66-5404-4B15-AE58-B7721F1568A4}.Release|Any CPU.ActiveCfg = Release|Any CPU - {1741DC66-5404-4B15-AE58-B7721F1568A4}.Release|Any CPU.Build.0 = Release|Any CPU + {2AA31A1F-142C-43F4-8687-09ABCA4B3A26}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {2AA31A1F-142C-43F4-8687-09ABCA4B3A26}.Debug|Any CPU.Build.0 = Debug|Any CPU + {2AA31A1F-142C-43F4-8687-09ABCA4B3A26}.Release|Any CPU.ActiveCfg = Release|Any CPU + {2AA31A1F-142C-43F4-8687-09ABCA4B3A26}.Release|Any CPU.Build.0 = Release|Any CPU + {F836E8E6-B4D9-4208-8346-140C74678B91}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F836E8E6-B4D9-4208-8346-140C74678B91}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F836E8E6-B4D9-4208-8346-140C74678B91}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F836E8E6-B4D9-4208-8346-140C74678B91}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/appveyor.yml b/appveyor.yml new file mode 100644 index 000000000..ebf5aed9c --- /dev/null +++ b/appveyor.yml @@ -0,0 +1,38 @@ +version: v3.0.0.{build} +os: Visual Studio 2015 +install: +# Remove NuGet v2 source as we want to use v3 for everything +- cmd: nuget sources remove -Name nuget.org +before_build: +- cmd: >- + dnvm install 1.0.0-beta8 -r clr + + dnvm install 1.0.0-beta8 -r coreclr -arch x64 -a x64 + + dnvm use 1.0.0-beta8 -r coreclr -a x64 + + dnvm list + + dnu restore src\ImageProcessor + + dnu restore tests\ImageProcessor.Tests + + cd build + + npm install + + node appveyor-project-version-patch.js + + cd.. +build: + project: ImageProcessor.sln + verbosity: minimal +test_script: +- cmd: >- + dnvm use 1.0.0-beta8 -r coreclr -a x64 + + cd tests/ImageProcessor.Tests + + dnx test +artifacts: +- path: artifacts\bin\ImageProcessor\**\*.nupkg \ No newline at end of file diff --git a/build/appveyor-project-version-patch.js b/build/appveyor-project-version-patch.js new file mode 100644 index 000000000..2af9f5a3c --- /dev/null +++ b/build/appveyor-project-version-patch.js @@ -0,0 +1,18 @@ +var jsonfile = require('jsonfile'); +var semver = require('semver'); + +var file = '../src/imageprocessor/project.json'; +var buildVersion = process.env.APPVEYOR_BUILD_VERSION.substring(1); +//var buildVersion = '3.0.0.23'; + +var findPoint = buildVersion.lastIndexOf("."); +var basePackageVer = buildVersion.substring(0, findPoint); +var buildNumber = buildVersion.substring(findPoint + 1, buildVersion.length); +var semversion = semver.valid(basePackageVer + '-alpha-' + buildNumber) + +jsonfile.readFile(file, function (err, project) { + project.version = semversion; + jsonfile.writeFile(file, project, {spaces: 2}, function(err) { + console.error(err); + }); +}) \ No newline at end of file diff --git a/build/package.json b/build/package.json new file mode 100644 index 000000000..59cc96e92 --- /dev/null +++ b/build/package.json @@ -0,0 +1,6 @@ +{ + "dependencies": { + "jsonfile": "^2.2.3", + "semver": "^5.0.3" + } +} diff --git a/global.json b/global.json new file mode 100644 index 000000000..b0323e428 --- /dev/null +++ b/global.json @@ -0,0 +1,3 @@ +{ + "projects": [ "src" ] +} \ No newline at end of file diff --git a/src/ImageProcessor/Common/Helpers/Guard.cs b/src/ImageProcessor/Common/Helpers/Guard.cs index bb2952754..b04af6129 100644 --- a/src/ImageProcessor/Common/Helpers/Guard.cs +++ b/src/ImageProcessor/Common/Helpers/Guard.cs @@ -8,6 +8,9 @@ // // -------------------------------------------------------------------------------------------------------------------- +using System.Runtime.CompilerServices; + +[assembly: InternalsVisibleTo("ImageProcessor.Tests")] namespace ImageProcessor { using System; diff --git a/src/ImageProcessor/ImageProcessor.csproj b/src/ImageProcessor/ImageProcessor.csproj deleted file mode 100644 index a36830e8f..000000000 --- a/src/ImageProcessor/ImageProcessor.csproj +++ /dev/null @@ -1,281 +0,0 @@ - - - - - 14.0 - Debug - AnyCPU - {8047C4AC-7097-4DE4-B00D-6D55EBCF1D36} - Library - Properties - ImageProcessor - ImageProcessor - en-US - 512 - {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - - - v5.0 - ..\..\ - true - - - - - true - full - false - bin\Debug\ - TRACE;DEBUG;NOCRYPTO;PCL - prompt - 4 - bin\Debug\ImageProcessor.XML - default - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - bin\Release\ImageProcessor.XML - true - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/ImageProcessor/ImageProcessor.csproj.DotSettings b/src/ImageProcessor/ImageProcessor.csproj.DotSettings deleted file mode 100644 index b4cd56a17..000000000 --- a/src/ImageProcessor/ImageProcessor.csproj.DotSettings +++ /dev/null @@ -1,24 +0,0 @@ - - CSharp60 - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True \ No newline at end of file diff --git a/src/ImageProcessor/ImageProcessor.nuspec b/src/ImageProcessor/ImageProcessor.nuspec deleted file mode 100644 index c86487aef..000000000 --- a/src/ImageProcessor/ImageProcessor.nuspec +++ /dev/null @@ -1,40 +0,0 @@ - - - - ImageProcessor - 3.0.0-alpha - ImageProcessor - James Jackson-South - James Jackson-South - http://www.apache.org/licenses/LICENSE-2.0 - http://imageprocessor.org - http://imageprocessor.org/assets/ico/apple-touch-icon-144x144.png - false - A cross-platform library for processing of image files written in C# - Alpha Release. - Copyright (c) James Jackson-South and contributors - Image Resize Crop Quality Gif Jpg Jpeg Bitmap Png Fluent Animated - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/ImageProcessor/ImageProcessor.xproj b/src/ImageProcessor/ImageProcessor.xproj new file mode 100644 index 000000000..041633c50 --- /dev/null +++ b/src/ImageProcessor/ImageProcessor.xproj @@ -0,0 +1,21 @@ + + + + 14.0 + $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) + + + + 2aa31a1f-142c-43f4-8687-09abca4b3a26 + ImageProcessor + ..\..\artifacts\obj\$(MSBuildProjectName) + ..\..\artifacts\bin\$(MSBuildProjectName)\ + + + 2.0 + + + True + + + \ No newline at end of file diff --git a/src/ImageProcessor/Settings.StyleCop b/src/ImageProcessor/Settings.StyleCop deleted file mode 100644 index dd461b1f1..000000000 --- a/src/ImageProcessor/Settings.StyleCop +++ /dev/null @@ -1,24 +0,0 @@ - - - - cb - octree - quantizer - cr - EX - png - rgb - scanline - scanlines - tEXt - xt - th - nd - rd - lomograph - polaroid - colorspace - kodachrome - - - \ No newline at end of file diff --git a/src/ImageProcessor/project.json b/src/ImageProcessor/project.json index 9e36b1e0a..e1e13a262 100644 --- a/src/ImageProcessor/project.json +++ b/src/ImageProcessor/project.json @@ -1,18 +1,29 @@ -{ - "supports": { - "net46.app": {}, - "uwp.10.0.app": {}, - "dnxcore50.app": {} - }, +{ + "version": "3.0.0-*", + "description": "ImageProcessor", + "authors": [ + "James Jackson-South" + ], + "tags": [ + "Image Resize Crop Quality Gif Jpg Jpeg Bitmap Png Fluent Animated" + ], + "projectUrl": "", + "licenseUrl": "", "dependencies": { - "Microsoft.NETCore": "5.0.0", + "System.Collections": "4.0.10", + "System.Linq": "4.0.0", + "System.Threading": "4.0.10", + "System.Runtime": "4.0.20", + "Microsoft.CSharp": "4.0.0", "Microsoft.NETCore.Portable.Compatibility": "1.0.0", - "NuSpec.ReferenceGenerator": "1.3.6", - "StyleCop.Analyzers": "1.0.0-beta015" + "System.Runtime.Extensions": "4.0.10", + "System.Reflection": "4.0.10", + "System.IO": "4.0.10", + "StyleCop.Analyzers": "1.0.0-beta015", + "Microsoft.NETCore": "5.0.1-beta-23409", + "Microsoft.NETCore.Platforms": "1.0.1-beta-23409" }, "frameworks": { - "dotnet": { - "imports": "portable-net452+win81" - } + "dotnet": {} } } \ No newline at end of file diff --git a/src/ImageProcessor/project.lock.json.REMOVED.git-id b/src/ImageProcessor/project.lock.json.REMOVED.git-id index bd57c2a7a..686b92b42 100644 --- a/src/ImageProcessor/project.lock.json.REMOVED.git-id +++ b/src/ImageProcessor/project.lock.json.REMOVED.git-id @@ -1 +1 @@ -5c58fbc6a5c85cdb06443246b3b327845381c790 \ No newline at end of file +b4afca3213a5d2714e409729a1ef2622b62a5bca \ No newline at end of file diff --git a/tests/ImageProcessor.Tests/ImageProcessor.Tests.csproj b/tests/ImageProcessor.Tests/ImageProcessor.Tests.csproj deleted file mode 100644 index 7e75ec647..000000000 --- a/tests/ImageProcessor.Tests/ImageProcessor.Tests.csproj +++ /dev/null @@ -1,96 +0,0 @@ - - - - - - Debug - AnyCPU - {1741DC66-5404-4B15-AE58-B7721F1568A4} - Library - Properties - ImageProcessor.Tests - ImageProcessor.Tests - v4.6 - 512 - {FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - - - ..\..\ - true - - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - - ..\..\packages\System.Collections.Immutable.1.1.37\lib\dotnet\System.Collections.Immutable.dll - True - - - - ..\..\packages\System.Numerics.Vectors.4.1.0\lib\net46\System.Numerics.Vectors.dll - True - - - ..\..\packages\xunit.abstractions.2.0.0\lib\net35\xunit.abstractions.dll - True - - - ..\..\packages\xunit.assert.2.0.0\lib\portable-net45+win+wpa81+wp80+monotouch+monoandroid+Xamarin.iOS\xunit.assert.dll - True - - - ..\..\packages\xunit.extensibility.core.2.0.0\lib\portable-net45+win+wpa81+wp80+monotouch+monoandroid+Xamarin.iOS\xunit.core.dll - True - - - - - - - - - - - - - - - - - - - - - {8047C4AC-7097-4DE4-B00D-6D55EBCF1D36} - ImageProcessor - - - - - - - - - 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/tests/ImageProcessor.Tests/ImageProcessor.Tests.csproj.DotSettings b/tests/ImageProcessor.Tests/ImageProcessor.Tests.csproj.DotSettings deleted file mode 100644 index cb4957f1e..000000000 --- a/tests/ImageProcessor.Tests/ImageProcessor.Tests.csproj.DotSettings +++ /dev/null @@ -1,9 +0,0 @@ - - True - True - True - True - True - True - True - True \ No newline at end of file diff --git a/tests/ImageProcessor.Tests/ImageProcessor.Tests.xproj b/tests/ImageProcessor.Tests/ImageProcessor.Tests.xproj new file mode 100644 index 000000000..248e79963 --- /dev/null +++ b/tests/ImageProcessor.Tests/ImageProcessor.Tests.xproj @@ -0,0 +1,21 @@ + + + + 14.0 + $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) + + + + f836e8e6-b4d9-4208-8346-140c74678b91 + ImageProcessor.Tests + ..\..\artifacts\obj\$(MSBuildProjectName) + ..\..\artifacts\bin\$(MSBuildProjectName)\ + + + 2.0 + + + + + + \ No newline at end of file diff --git a/tests/ImageProcessor.Tests/Processors/Filters/FilterTests.cs b/tests/ImageProcessor.Tests/Processors/Filters/FilterTests.cs index 76b0bfdaa..35029e8d9 100644 --- a/tests/ImageProcessor.Tests/Processors/Filters/FilterTests.cs +++ b/tests/ImageProcessor.Tests/Processors/Filters/FilterTests.cs @@ -17,7 +17,7 @@ namespace ImageProcessor.Tests { "Brightness--50", new Brightness(-50) }, { "Contrast-50", new Contrast(50) }, { "Contrast--50", new Contrast(-50) }, - { "Blend", new Blend(new Image(File.OpenRead("../../TestImages/Formats/Bmp/Car.bmp")),15)}, + { "Blend", new Blend(new Image(File.OpenRead("TestImages/Formats/Bmp/Car.bmp")),15)}, { "Saturation-50", new Saturation(50) }, { "Saturation--50", new Saturation(-50) }, { "Alpha--50", new Alpha(50) }, diff --git a/tests/ImageProcessor.Tests/Processors/ProcessorTestBase.cs b/tests/ImageProcessor.Tests/Processors/ProcessorTestBase.cs index a34f6117f..059a94a3e 100644 --- a/tests/ImageProcessor.Tests/Processors/ProcessorTestBase.cs +++ b/tests/ImageProcessor.Tests/Processors/ProcessorTestBase.cs @@ -21,7 +21,7 @@ namespace ImageProcessor.Tests { //"../../TestImages/Formats/Jpg/Backdrop.jpg", //"../../TestImages/Formats/Jpg/Calliphora.jpg", - "../../TestImages/Formats/Jpg/china.jpg", + "TestImages/Formats/Jpg/china.jpg", //"../../TestImages/Formats/Jpg/ant.jpg", //"../../TestImages/Formats/Jpg/parachute.jpg", //"../../TestImages/Formats/Jpg/lomo.jpg", @@ -29,10 +29,10 @@ namespace ImageProcessor.Tests //"../../TestImages/Formats/Jpg/gamma_dalai_lama_gray.jpg", //"../../TestImages/Formats/Jpg/greyscale.jpg", //"../../TestImages/Formats/Bmp/Car.bmp", - "../../TestImages/Formats/Png/cballs.png", + "TestImages/Formats/Png/cballs.png", //"../../TestImages/Formats/Png/cmyk.png", //"../../TestImages/Formats/Png/gamma-1.0-or-2.2.png", - "../../TestImages/Formats/Png/splash.png", + "TestImages/Formats/Png/splash.png", //"../../TestImages/Formats/Gif/leaf.gif", //"../../TestImages/Formats/Gif/ben2.gif", //"../../TestImages/Formats/Gif/rings.gif", diff --git a/tests/ImageProcessor.Tests/Properties/AssemblyInfo.cs b/tests/ImageProcessor.Tests/Properties/AssemblyInfo.cs index b44979c8b..a21728dc8 100644 --- a/tests/ImageProcessor.Tests/Properties/AssemblyInfo.cs +++ b/tests/ImageProcessor.Tests/Properties/AssemblyInfo.cs @@ -2,7 +2,7 @@ using System.Runtime.CompilerServices; using System.Runtime.InteropServices; -// General Information about an assembly is controlled through the following +// General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTitle("ImageProcessor.Tests")] @@ -14,23 +14,10 @@ using System.Runtime.InteropServices; [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 +// 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("8fea7d87-3f18-465a-b15f-abb1783c95bc")] - -// 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")] +[assembly: Guid("f836e8e6-b4d9-4208-8346-140c74678b91")] diff --git a/tests/ImageProcessor.Tests/packages.config b/tests/ImageProcessor.Tests/packages.config deleted file mode 100644 index 7cef95935..000000000 --- a/tests/ImageProcessor.Tests/packages.config +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/tests/ImageProcessor.Tests/project.json b/tests/ImageProcessor.Tests/project.json new file mode 100644 index 000000000..2d57c937a --- /dev/null +++ b/tests/ImageProcessor.Tests/project.json @@ -0,0 +1,29 @@ +{ + "version": "1.0.0-*", + "description": "ImageProcessor.Tests Class Library", + "authors": [ "jeavon" ], + "tags": [ "" ], + "projectUrl": "", + "licenseUrl": "", + "frameworks": { + "dnxcore50": { + "dependencies": { + "Microsoft.CSharp": "4.0.1-beta-23409", + "System.Collections": "4.0.11-beta-23409", + "System.Linq": "4.0.1-beta-23409", + "System.Runtime": "4.0.21-beta-23409", + "System.Threading": "4.0.11-beta-23409" + } + } + }, + "dependencies": { + "ImageProcessor": "3.0.0-*", + "Microsoft.NETCore": "5.0.1-beta-23409", + "Microsoft.NETCore.Platforms": "1.0.1-beta-23409", + "xunit": "2.1.0", + "xunit.runner.dnx": "2.1.0-beta6-build191" + }, + "commands": { + "test": "xunit.runner.dnx" + } +} diff --git a/tests/ImageProcessor.Tests/project.lock.json.REMOVED.git-id b/tests/ImageProcessor.Tests/project.lock.json.REMOVED.git-id new file mode 100644 index 000000000..516e70542 --- /dev/null +++ b/tests/ImageProcessor.Tests/project.lock.json.REMOVED.git-id @@ -0,0 +1 @@ +986564cced9c1356c73f345d4f605395896bf156 \ No newline at end of file