Browse Source

Merge branch 'tocsoft/mutate-api' into jpeg-port

Also fix Oilpainting test
pull/274/head
James Jackson-South 9 years ago
parent
commit
0baf7d095b
  1. 2
      .gitignore
  2. 28
      .vscode/launch.json
  3. 6
      ImageSharp.ruleset
  4. 51
      ImageSharp.sln
  5. 22
      README.md
  6. 31
      appveyor.yml
  7. 36
      build.cmd
  8. 463
      build/Program.cs
  9. 8
      build/Properties/launchSettings.json
  10. 18
      build/build.cmd
  11. 16
      build/build.csproj
  12. 8
      build/reset-versions.cmd
  13. 60
      samples/AvatarWithRoundedCorner/Program.cs
  14. 11
      samples/ChangeDefaultEncoderOptions/Program.cs
  15. 10
      src/ImageSharp.Drawing/Brushes/Brushes.cs
  16. 14
      src/ImageSharp.Drawing/Brushes/IBrush.cs
  17. 19
      src/ImageSharp.Drawing/Brushes/ImageBrush{TPixel}.cs
  18. 21
      src/ImageSharp.Drawing/Brushes/PatternBrush{TPixel}.cs
  19. 15
      src/ImageSharp.Drawing/Brushes/Processors/BrushApplicator.cs
  20. 21
      src/ImageSharp.Drawing/Brushes/RecolorBrush{TPixel}.cs
  21. 21
      src/ImageSharp.Drawing/Brushes/SolidBrush{TPixel}.cs
  22. 14
      src/ImageSharp.Drawing/DrawImage.cs
  23. 16
      src/ImageSharp.Drawing/FillRegion.cs
  24. 20
      src/ImageSharp.Drawing/ImageSharp.Drawing.csproj
  25. 22
      src/ImageSharp.Drawing/Paths/DrawBeziers.cs
  26. 22
      src/ImageSharp.Drawing/Paths/DrawLines.cs
  27. 18
      src/ImageSharp.Drawing/Paths/DrawPath.cs
  28. 18
      src/ImageSharp.Drawing/Paths/DrawPathCollection.cs
  29. 22
      src/ImageSharp.Drawing/Paths/DrawPolygon.cs
  30. 18
      src/ImageSharp.Drawing/Paths/DrawRectangle.cs
  31. 18
      src/ImageSharp.Drawing/Paths/FillPathBuilder.cs
  32. 16
      src/ImageSharp.Drawing/Paths/FillPathCollection.cs
  33. 16
      src/ImageSharp.Drawing/Paths/FillPaths.cs
  34. 22
      src/ImageSharp.Drawing/Paths/FillPolygon.cs
  35. 16
      src/ImageSharp.Drawing/Paths/FillRectangle.cs
  36. 17
      src/ImageSharp.Drawing/Paths/ShapePath.cs
  37. 20
      src/ImageSharp.Drawing/Paths/ShapeRegion.cs
  38. 12
      src/ImageSharp.Drawing/Pens/IPen.cs
  39. 10
      src/ImageSharp.Drawing/Pens/Pens.cs
  40. 19
      src/ImageSharp.Drawing/Pens/Pen{TPixel}.cs
  41. 6
      src/ImageSharp.Drawing/PointInfo.cs
  42. 23
      src/ImageSharp.Drawing/Processors/DrawImageProcessor.cs
  43. 26
      src/ImageSharp.Drawing/Processors/FillProcessor.cs
  44. 25
      src/ImageSharp.Drawing/Processors/FillRegionProcessor.cs
  45. 4
      src/ImageSharp.Drawing/Properties/AssemblyInfo.cs
  46. 12
      src/ImageSharp.Drawing/Region.cs
  47. 23
      src/ImageSharp.Drawing/Text/DrawText.Path.cs
  48. 25
      src/ImageSharp.Drawing/Text/DrawText.cs
  49. 12
      src/ImageSharp.Drawing/Text/TextGraphicsOptions.cs
  50. 48
      src/ImageSharp/ApplyProcessors.cs
  51. 16
      src/ImageSharp/ColorSpaces/CieLab.cs
  52. 16
      src/ImageSharp/ColorSpaces/CieLch.cs
  53. 16
      src/ImageSharp/ColorSpaces/CieLchuv.cs
  54. 16
      src/ImageSharp/ColorSpaces/CieLuv.cs
  55. 16
      src/ImageSharp/ColorSpaces/CieXyChromaticityCoordinates.cs
  56. 16
      src/ImageSharp/ColorSpaces/CieXyy.cs
  57. 16
      src/ImageSharp/ColorSpaces/CieXyz.cs
  58. 16
      src/ImageSharp/ColorSpaces/Cmyk.cs
  59. 6
      src/ImageSharp/ColorSpaces/Conversion/CieConstants.cs
  60. 15
      src/ImageSharp/ColorSpaces/Conversion/ColorSpaceConverter.Adapt.cs
  61. 14
      src/ImageSharp/ColorSpaces/Conversion/ColorSpaceConverter.CieLab.cs
  62. 10
      src/ImageSharp/ColorSpaces/Conversion/ColorSpaceConverter.CieLch.cs
  63. 10
      src/ImageSharp/ColorSpaces/Conversion/ColorSpaceConverter.CieLchuv.cs
  64. 14
      src/ImageSharp/ColorSpaces/Conversion/ColorSpaceConverter.CieLuv.cs
  65. 10
      src/ImageSharp/ColorSpaces/Conversion/ColorSpaceConverter.CieXyy.cs
  66. 18
      src/ImageSharp/ColorSpaces/Conversion/ColorSpaceConverter.CieXyz.cs
  67. 12
      src/ImageSharp/ColorSpaces/Conversion/ColorSpaceConverter.Cmyk.cs
  68. 12
      src/ImageSharp/ColorSpaces/Conversion/ColorSpaceConverter.Hsl.cs
  69. 12
      src/ImageSharp/ColorSpaces/Conversion/ColorSpaceConverter.Hsv.cs
  70. 10
      src/ImageSharp/ColorSpaces/Conversion/ColorSpaceConverter.HunterLab.cs
  71. 10
      src/ImageSharp/ColorSpaces/Conversion/ColorSpaceConverter.LinearRgb.cs
  72. 10
      src/ImageSharp/ColorSpaces/Conversion/ColorSpaceConverter.Lms.cs
  73. 10
      src/ImageSharp/ColorSpaces/Conversion/ColorSpaceConverter.Rgb.cs
  74. 12
      src/ImageSharp/ColorSpaces/Conversion/ColorSpaceConverter.YCbCr.cs
  75. 15
      src/ImageSharp/ColorSpaces/Conversion/ColorSpaceConverter.cs
  76. 10
      src/ImageSharp/ColorSpaces/Conversion/IChromaticAdaptation.cs
  77. 6
      src/ImageSharp/ColorSpaces/Conversion/IColorConversion.cs
  78. 13
      src/ImageSharp/ColorSpaces/Conversion/Implementation/CieLab/CieLabToCieXyzConverter.cs
  79. 13
      src/ImageSharp/ColorSpaces/Conversion/Implementation/CieLab/CieXyzToCieLabConverter.cs
  80. 13
      src/ImageSharp/ColorSpaces/Conversion/Implementation/CieLch/CIeLchToCieLabConverter.cs
  81. 13
      src/ImageSharp/ColorSpaces/Conversion/Implementation/CieLch/CieLabToCieLchConverter.cs
  82. 13
      src/ImageSharp/ColorSpaces/Conversion/Implementation/CieLchuv/CieLchuvToCieLuvConverter.cs
  83. 13
      src/ImageSharp/ColorSpaces/Conversion/Implementation/CieLchuv/CieLuvToCieLchuvConverter.cs
  84. 12
      src/ImageSharp/ColorSpaces/Conversion/Implementation/CieLuv/CieLuvToCieXyzConverter.cs
  85. 13
      src/ImageSharp/ColorSpaces/Conversion/Implementation/CieLuv/CieXyzToCieLuvConverter.cs
  86. 13
      src/ImageSharp/ColorSpaces/Conversion/Implementation/CieXyy/CieXyzAndCieXyyConverter.cs
  87. 15
      src/ImageSharp/ColorSpaces/Conversion/Implementation/Cmyk/CmykAndRgbConverter.cs
  88. 13
      src/ImageSharp/ColorSpaces/Conversion/Implementation/Hsl/HslAndRgbConverter.cs
  89. 15
      src/ImageSharp/ColorSpaces/Conversion/Implementation/Hsv/HsvAndRgbConverter.cs
  90. 10
      src/ImageSharp/ColorSpaces/Conversion/Implementation/HunterLab/CieXyzAndHunterLabConverterBase.cs
  91. 13
      src/ImageSharp/ColorSpaces/Conversion/Implementation/HunterLab/CieXyzToHunterLabConverter.cs
  92. 13
      src/ImageSharp/ColorSpaces/Conversion/Implementation/HunterLab/HunterLabToCieXyzConverter.cs
  93. 15
      src/ImageSharp/ColorSpaces/Conversion/Implementation/Lms/CieXyzAndLmsConverter.cs
  94. 10
      src/ImageSharp/ColorSpaces/Conversion/Implementation/Lms/LmsAdaptationMatrix.cs
  95. 12
      src/ImageSharp/ColorSpaces/Conversion/Implementation/Rgb/CieXyzToLinearRgbConverter.cs
  96. 12
      src/ImageSharp/ColorSpaces/Conversion/Implementation/Rgb/GammaCompanding.cs
  97. 10
      src/ImageSharp/ColorSpaces/Conversion/Implementation/Rgb/LCompanding.cs
  98. 10
      src/ImageSharp/ColorSpaces/Conversion/Implementation/Rgb/LinearRgbAndCieXyzConverterBase.cs
  99. 12
      src/ImageSharp/ColorSpaces/Conversion/Implementation/Rgb/LinearRgbToCieXyzConverter.cs
  100. 12
      src/ImageSharp/ColorSpaces/Conversion/Implementation/Rgb/LinearRgbToRgbConverter.cs

2
.gitignore

@ -158,7 +158,6 @@ AppPackages/
# Others
*.[Cc]ache
ClientBin/
[Ss]tyle[Cc]op.*
~$*
*~
*.dbmdl
@ -219,3 +218,4 @@ artifacts/
**/CodeCoverage/*
docs/
/samples/AvatarWithRoundedCorner/output
/ImageSharp.Coverage.xml

28
.vscode/launch.json

@ -0,0 +1,28 @@
{
// Use IntelliSense to find out which attributes exist for C# debugging
// Use hover for the description of the existing attributes
// For further information visit https://github.com/OmniSharp/omnisharp-vscode/blob/master/debugger-launchjson.md
"version": "0.2.0",
"configurations": [
{
"name": ".NET Core Launch (console)",
"type": "coreclr",
"request": "launch",
"preLaunchTask": "build",
// If you have changed target frameworks, make sure to update the program path.
"program": "${workspaceRoot}/samples/AvatarWithRoundedCorner/bin/Debug/netcoreapp1.1/AvatarWithRoundedCorner.dll",
"args": [],
"cwd": "${workspaceRoot}/samples/AvatarWithRoundedCorner",
// For more information about the 'console' field, see https://github.com/OmniSharp/omnisharp-vscode/blob/master/debugger-launchjson.md#console-terminal-window
"console": "internalConsole",
"stopAtEntry": false,
"internalConsoleOptions": "openOnSessionStart"
},
{
"name": ".NET Core Attach",
"type": "coreclr",
"request": "attach",
"processId": "${command:pickProcess}"
}
]
}

6
ImageSharp.ruleset

@ -2,10 +2,10 @@
<RuleSet Name="ImageSharp" ToolsVersion="15.0">
<Rules AnalyzerId="StyleCop.Analyzers" RuleNamespace="StyleCop.Analyzers">
<Rule Id="AD0001" Action="None" />
<Rule Id="SA1405" Action="None" />
<Rule Id="SA1413" Action="None" />
<!-- temp remove the header requirement as stylecop is currently failing to read the stylecop.json file from 'dotnet build' -->
<Rule Id="SA1636" Action="None" />
<!-- <Rule Id="SA1405" Action="None" />
temp remove the header requirement as stylecop is currently failing to read the stylecop.json file from 'dotnet build'
<Rule Id="SA1636" Action="None" />-->
<Rule Id="SA1633" Action="None" />
</Rules>
</RuleSet>

51
ImageSharp.sln

@ -1,7 +1,7 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.26430.14
VisualStudioVersion = 15.0.26730.3
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "SolutionItems", "SolutionItems", "{C317F1B1-D75E-4C6D-83EB-80367343E0D7}"
ProjectSection(SolutionItems) = preProject
@ -30,27 +30,24 @@ EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Shared", "Shared", "{9E574A07-F879-4811-9C41-5CBDC6BAFDB7}"
ProjectSection(SolutionItems) = preProject
src\Shared\AssemblyInfo.Common.cs = src\Shared\AssemblyInfo.Common.cs
src\Shared\stylecop.json = src\Shared\stylecop.json
EndProjectSection
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ImageSharp", "src\ImageSharp\ImageSharp.csproj", "{2AA31A1F-142C-43F4-8687-09ABCA4B3A26}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ImageSharp.Drawing", "src\ImageSharp.Drawing\ImageSharp.Drawing.csproj", "{2E33181E-6E28-4662-A801-E2E7DC206029}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "build", "build\build.csproj", "{575A5002-DD9F-4335-AA47-1DD87FA13645}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ImageSharp.Tests", "tests\ImageSharp.Tests\ImageSharp.Tests.csproj", "{EA3000E9-2A91-4EC4-8A68-E566DEBDC4F6}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ImageSharp.Benchmarks", "tests\ImageSharp.Benchmarks\ImageSharp.Benchmarks.csproj", "{2BF743D8-2A06-412D-96D7-F448F00C5EA5}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ImageSharp.Sandbox46", "tests\ImageSharp.Sandbox46\ImageSharp.Sandbox46.csproj", "{96188137-5FA6-4924-AB6E-4EFF79C6E0BB}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "samples", "samples", "{7CC6D57E-B916-43B8-B315-A0BB92F260A2}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AvatarWithRoundedCorner", "samples\AvatarWithRoundedCorner\AvatarWithRoundedCorner.csproj", "{844FC582-4E78-4371-847D-EFD4D1103578}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ChangeDefaultEncoderOptions", "samples\ChangeDefaultEncoderOptions\ChangeDefaultEncoderOptions.csproj", "{07EE511D-4BAB-4323-BAFC-3AF2BF9366F0}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ImageSharp.Sandbox46", "tests\ImageSharp.Sandbox46\ImageSharp.Sandbox46.csproj", "{561B880A-D9EE-44EF-90F5-817C54A9D9AB}"
EndProject
Global
GlobalSection(Performance) = preSolution
HasPerformanceSessions = true
@ -88,18 +85,6 @@ Global
{2E33181E-6E28-4662-A801-E2E7DC206029}.Release|x64.Build.0 = Release|Any CPU
{2E33181E-6E28-4662-A801-E2E7DC206029}.Release|x86.ActiveCfg = Release|Any CPU
{2E33181E-6E28-4662-A801-E2E7DC206029}.Release|x86.Build.0 = Release|Any CPU
{575A5002-DD9F-4335-AA47-1DD87FA13645}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{575A5002-DD9F-4335-AA47-1DD87FA13645}.Debug|Any CPU.Build.0 = Debug|Any CPU
{575A5002-DD9F-4335-AA47-1DD87FA13645}.Debug|x64.ActiveCfg = Debug|Any CPU
{575A5002-DD9F-4335-AA47-1DD87FA13645}.Debug|x64.Build.0 = Debug|Any CPU
{575A5002-DD9F-4335-AA47-1DD87FA13645}.Debug|x86.ActiveCfg = Debug|Any CPU
{575A5002-DD9F-4335-AA47-1DD87FA13645}.Debug|x86.Build.0 = Debug|Any CPU
{575A5002-DD9F-4335-AA47-1DD87FA13645}.Release|Any CPU.ActiveCfg = Release|Any CPU
{575A5002-DD9F-4335-AA47-1DD87FA13645}.Release|Any CPU.Build.0 = Release|Any CPU
{575A5002-DD9F-4335-AA47-1DD87FA13645}.Release|x64.ActiveCfg = Release|Any CPU
{575A5002-DD9F-4335-AA47-1DD87FA13645}.Release|x64.Build.0 = Release|Any CPU
{575A5002-DD9F-4335-AA47-1DD87FA13645}.Release|x86.ActiveCfg = Release|Any CPU
{575A5002-DD9F-4335-AA47-1DD87FA13645}.Release|x86.Build.0 = Release|Any CPU
{EA3000E9-2A91-4EC4-8A68-E566DEBDC4F6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{EA3000E9-2A91-4EC4-8A68-E566DEBDC4F6}.Debug|Any CPU.Build.0 = Debug|Any CPU
{EA3000E9-2A91-4EC4-8A68-E566DEBDC4F6}.Debug|x64.ActiveCfg = Debug|Any CPU
@ -124,18 +109,6 @@ Global
{2BF743D8-2A06-412D-96D7-F448F00C5EA5}.Release|x64.Build.0 = Release|Any CPU
{2BF743D8-2A06-412D-96D7-F448F00C5EA5}.Release|x86.ActiveCfg = Release|Any CPU
{2BF743D8-2A06-412D-96D7-F448F00C5EA5}.Release|x86.Build.0 = Release|Any CPU
{96188137-5FA6-4924-AB6E-4EFF79C6E0BB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{96188137-5FA6-4924-AB6E-4EFF79C6E0BB}.Debug|Any CPU.Build.0 = Debug|Any CPU
{96188137-5FA6-4924-AB6E-4EFF79C6E0BB}.Debug|x64.ActiveCfg = Debug|Any CPU
{96188137-5FA6-4924-AB6E-4EFF79C6E0BB}.Debug|x64.Build.0 = Debug|Any CPU
{96188137-5FA6-4924-AB6E-4EFF79C6E0BB}.Debug|x86.ActiveCfg = Debug|Any CPU
{96188137-5FA6-4924-AB6E-4EFF79C6E0BB}.Debug|x86.Build.0 = Debug|Any CPU
{96188137-5FA6-4924-AB6E-4EFF79C6E0BB}.Release|Any CPU.ActiveCfg = Release|Any CPU
{96188137-5FA6-4924-AB6E-4EFF79C6E0BB}.Release|Any CPU.Build.0 = Release|Any CPU
{96188137-5FA6-4924-AB6E-4EFF79C6E0BB}.Release|x64.ActiveCfg = Release|Any CPU
{96188137-5FA6-4924-AB6E-4EFF79C6E0BB}.Release|x64.Build.0 = Release|Any CPU
{96188137-5FA6-4924-AB6E-4EFF79C6E0BB}.Release|x86.ActiveCfg = Release|Any CPU
{96188137-5FA6-4924-AB6E-4EFF79C6E0BB}.Release|x86.Build.0 = Release|Any CPU
{844FC582-4E78-4371-847D-EFD4D1103578}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{844FC582-4E78-4371-847D-EFD4D1103578}.Debug|Any CPU.Build.0 = Debug|Any CPU
{844FC582-4E78-4371-847D-EFD4D1103578}.Debug|x64.ActiveCfg = Debug|Any CPU
@ -160,6 +133,18 @@ Global
{07EE511D-4BAB-4323-BAFC-3AF2BF9366F0}.Release|x64.Build.0 = Release|Any CPU
{07EE511D-4BAB-4323-BAFC-3AF2BF9366F0}.Release|x86.ActiveCfg = Release|Any CPU
{07EE511D-4BAB-4323-BAFC-3AF2BF9366F0}.Release|x86.Build.0 = Release|Any CPU
{561B880A-D9EE-44EF-90F5-817C54A9D9AB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{561B880A-D9EE-44EF-90F5-817C54A9D9AB}.Debug|Any CPU.Build.0 = Debug|Any CPU
{561B880A-D9EE-44EF-90F5-817C54A9D9AB}.Debug|x64.ActiveCfg = Debug|Any CPU
{561B880A-D9EE-44EF-90F5-817C54A9D9AB}.Debug|x64.Build.0 = Debug|Any CPU
{561B880A-D9EE-44EF-90F5-817C54A9D9AB}.Debug|x86.ActiveCfg = Debug|Any CPU
{561B880A-D9EE-44EF-90F5-817C54A9D9AB}.Debug|x86.Build.0 = Debug|Any CPU
{561B880A-D9EE-44EF-90F5-817C54A9D9AB}.Release|Any CPU.ActiveCfg = Release|Any CPU
{561B880A-D9EE-44EF-90F5-817C54A9D9AB}.Release|Any CPU.Build.0 = Release|Any CPU
{561B880A-D9EE-44EF-90F5-817C54A9D9AB}.Release|x64.ActiveCfg = Release|Any CPU
{561B880A-D9EE-44EF-90F5-817C54A9D9AB}.Release|x64.Build.0 = Release|Any CPU
{561B880A-D9EE-44EF-90F5-817C54A9D9AB}.Release|x86.ActiveCfg = Release|Any CPU
{561B880A-D9EE-44EF-90F5-817C54A9D9AB}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@ -168,11 +153,13 @@ Global
{9E574A07-F879-4811-9C41-5CBDC6BAFDB7} = {815C0625-CD3D-440F-9F80-2D83856AB7AE}
{2AA31A1F-142C-43F4-8687-09ABCA4B3A26} = {815C0625-CD3D-440F-9F80-2D83856AB7AE}
{2E33181E-6E28-4662-A801-E2E7DC206029} = {815C0625-CD3D-440F-9F80-2D83856AB7AE}
{575A5002-DD9F-4335-AA47-1DD87FA13645} = {E919DF0B-2607-4462-8FC0-5C98FE50F8C9}
{EA3000E9-2A91-4EC4-8A68-E566DEBDC4F6} = {56801022-D71A-4FBE-BC5B-CBA08E2284EC}
{2BF743D8-2A06-412D-96D7-F448F00C5EA5} = {56801022-D71A-4FBE-BC5B-CBA08E2284EC}
{96188137-5FA6-4924-AB6E-4EFF79C6E0BB} = {56801022-D71A-4FBE-BC5B-CBA08E2284EC}
{844FC582-4E78-4371-847D-EFD4D1103578} = {7CC6D57E-B916-43B8-B315-A0BB92F260A2}
{07EE511D-4BAB-4323-BAFC-3AF2BF9366F0} = {7CC6D57E-B916-43B8-B315-A0BB92F260A2}
{561B880A-D9EE-44EF-90F5-817C54A9D9AB} = {56801022-D71A-4FBE-BC5B-CBA08E2284EC}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {5F8B9D1F-CD8B-4CC5-8216-D531E25BD795}
EndGlobalSection
EndGlobal

22
README.md

@ -7,7 +7,7 @@ Built against .Net Standard 1.1 ImageSharp can be used in device, cloud, and emb
> **ImageSharp** has made excellent progress and contains many great features but is still considered by us to be still in early stages (alpha). As such, we cannot support its use on production environments until the library reaches release candidate status.
>
> Pre-release downloads are available from the [MyGet package repository](https://www.myget.org/gallery/imagesharp).
> Pre-release downloads are available from the [MyGet package repository](https://www.myget.org/gallery/sixlabors).
[![GitHub license](https://img.shields.io/badge/license-Apache%202-blue.svg)](https://raw.githubusercontent.com/SixLabors/ImageSharp/master/APACHE-2.0-LICENSE.txt)
[![GitHub issues](https://img.shields.io/github/issues/SixLabors/ImageSharp.svg)](https://github.com/SixLabors/ImageSharp/issues)
@ -31,20 +31,20 @@ At present the code is pre-release but when ready it will be available on [Nuget
**Pre-release downloads**
We already have a [MyGet package repository](https://www.myget.org/gallery/imagesharp) - for bleeding-edge / development NuGet releases.
We already have a [MyGet package repository](https://www.myget.org/gallery/sixlabors) - for bleeding-edge / development NuGet releases.
### Packages
The **ImageSharp** library is made up of multiple packages.
Packages include:
- **ImageSharp**
- **SixLabors.ImageSharp**
- Contains the generic `Image<TPixel>` class, PixelFormats, Primitives, Configuration, and other core functionality.
- The `IImageFormat` interface, Jpeg, Png, Bmp, and Gif formats.
- Transform methods like Resize, Crop, Skew, Rotate - Anything that alters the dimensions of the image.
- Non-transform methods like Gaussian Blur, Pixelate, Edge Detection - Anything that maintains the original image dimensions.
- **ImageSharp.Drawing**
- **SixLabors.ImageSharp.Drawing**
- Brushes and various drawing algorithms, including drawing images.
- Various vector drawing methods for drawing paths, polygons etc.
- Text drawing.
@ -88,9 +88,10 @@ On platforms supporting netstandard 1.3+
// Image.Load(string path) is a shortcut for our default type. Other pixel formats use Image.Load<TPixel>(string path))
using (Image<Rgba32> image = Image.Load("foo.jpg"))
{
image.Resize(image.Width / 2, image.Height / 2)
.Grayscale()
.Save("bar.jpg"); // automatic encoder selected based on extension.
image.Mutate(x=>x
.Resize(image.Width / 2, image.Height / 2)
.Grayscale());
image.Save("bar.jpg"); // automatic encoder selected based on extension.
}
```
on netstandard 1.1 - 1.2
@ -100,9 +101,10 @@ using (FileStream stream = File.OpenRead("foo.jpg"))
using (FileStream output = File.OpenWrite("bar.jpg"))
using (Image<Rgba32> image = Image.Load<Rgba32>(stream))
{
image.Resize(image.Width / 2, image.Height / 2)
.Grayscale()
.Save(output);
image.Mutate(x=>x
.Resize(image.Width / 2, image.Height / 2)
.Grayscale());
image.Save(output);
}
```

31
appveyor.yml

@ -1,11 +1,13 @@
version: 1.0.0.{build}
image: Visual Studio 2017
# prevent the double build when a branch has an active PR
skip_branch_with_pr: true
init:
- ps: iex ((new-object net.webclient).DownloadString('https://gist.githubusercontent.com/PureKrome/0f79e25693d574807939/raw/8cf3160c9516ef1f4effc825c0a44acc918a0b5a/appveyor-build-info.ps'))
install:
- choco install gitversion.portable -pre -y
before_build:
- cmd: dotnet --version
- ps: gitversion /l console /output buildserver
build_script:
- cmd: build.cmd
@ -13,16 +15,17 @@ build_script:
test_script:
- tests\CodeCoverage\CodeCoverage.cmd
artifacts:
- path: artifacts\bin\ImageSharp\**\*.nupkg
after_build:
- cmd: appveyor PushArtifact "artifacts\SixLabors.ImageSharp.%GitVersion_NuGetVersion%.nupkg"
- cmd: appveyor PushArtifact "artifacts\SixLabors.ImageSharp.Drawing.%GitVersion_NuGetVersion%.nupkg"
deploy:
# MyGet Deployment for builds & releases
- provider: NuGet
server: https://www.myget.org/F/imagesharp/api/v2/package
symbol_server: https://www.myget.org/F/imagesharp/symbols/api/v2/package
api_key:
secure: P2Fz82nty+itjL+kNRCsMQcqzngmVtkU0R4CZqgST7zgUaE6/1q9ekh5MKKlZLkD
artifact: /.*\.nupkg/
on:
branch: master
- provider: NuGet
server: https://www.myget.org/F/sixlabors/api/v2/package
symbol_server: https://www.myget.org/F/sixlabors/symbols/api/v2/package
api_key:
secure: V/lEHP0UeMWIpWd0fiNlY2IgbCnJKQlGdRksECdJbOBdaE20Fl0RNL7WyqHe02o4
artifact: /.*\.nupkg/
on:
branch: master

36
build.cmd

@ -1,2 +1,36 @@
@echo Off
call build\build.cmd
if not "%GitVersion_NuGetVersion%" == "" (
SET versionCommand=/p:packageversion=%GitVersion_NuGetVersion%
@echo building with version set to '%GitVersion_NuGetVersion%'
)
dotnet restore %versionCommand%
ECHO Building nuget packages
dotnet build -c Release %versionCommand%
if not "%errorlevel%"=="0" goto failure
if not %CI% == "True" (
dotnet test ./tests/ImageSharp.Tests/ImageSharp.Tests.csproj --no-build -c Release
if not "%errorlevel%"=="0" goto failure
)
dotnet pack ./src/ImageSharp/ -c Release --output ../../artifacts --no-build %versionCommand%
if not "%errorlevel%"=="0" goto failure
dotnet pack ./src/ImageSharp.Drawing/ -c Release --output ../../artifacts --no-build %versionCommand%
if not "%errorlevel%"=="0" goto failure
:success
ECHO successfully built project
REM exit 0
goto end
:failure
ECHO failed to build.
REM exit -1
goto end
:end

463
build/Program.cs

@ -1,463 +0,0 @@
// <copyright file="Program.cs" company="James Jackson-South">
// Copyright (c) James Jackson-South and contributors.
// Licensed under the Apache License, Version 2.0.
// </copyright>
namespace ConsoleApplication
{
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Xml;
using LibGit2Sharp;
using Microsoft.Build.Construction;
using Microsoft.Build.Evaluation;
using NuGet.Versioning;
/// <summary>
/// This updates the version numbers for all the projects in the src folder.
/// The version number it will geneate is dependent on if this is a build from master or a branch/PR
///
/// If its a build on master
/// We take the version number specified in project.json,
/// count how meny commits the repo has had that will affect this project or its dependencies since the version number of manually changed
/// If this is the first commit that effected this project since number change then leave the version number as defined i.e. will build 1.0.0 if thats in project.json
/// unless it is a preview build number in which case we always add the counter
///
/// If the build is from a PR/branch
/// We take the version number specified in project.json, append a tag for the branch/PR (so we can determin how each package was built)
/// append number of commits effecting the project.
///
/// </summary>
/// <example>
/// for PR#123 and project.json version 2.0.1 and we have had 30 commits affecting the project
/// we would end up with version number 2.0.1-PR124-00030
///
/// for branch `fix-stuff` project.json version 2.0.1-alpha1 and we have had 832 commits affecting the project
/// we would end up with version number 2.0.1-alpha1-fix-stuff-00832
///
/// for `master` project.json version 2.0.1-alpha1 and we have had 832 commits affecting the project
/// we would end up with version number 2.0.1-alpha1-00832
///
/// for `master` project.json version 2.0.1 and we have had 132 commits affecting the project
/// we would end up with version number 2.0.1-CI-00132
///
/// for `master` project.json version 2.0.1 and we have had 1 commits affecting the project
/// we would end up with version number 2.0.1
///
/// for `master` project.json version 2.0.1-alpha1 and we have had 1 commits affecting the project
/// we would end up with version number 2.0.1-alpha1
/// </example>
/// <remarks>
/// TODO Add the option for using this to update the version numbers in a project and its dependent references.
/// </remarks>
public class Program
{
private const string FallbackTag = "CI";
/// <summary>
/// Main entry point.
/// </summary>
/// <param name="args">The arguments.</param>
public static void Main(string[] args)
{
bool resetmode = args.Contains("reset");
// Find the project root
string root = Path.GetFullPath(Path.Combine(LibGit2Sharp.Repository.Discover("."), ".."));
// Lets find the repo
Repository repo = new LibGit2Sharp.Repository(root);
// Lets find all the project.json files in the src folder (don't care about versioning `tests`)
IEnumerable<string> projectFiles = Directory.EnumerateFiles(Path.Combine(root, "src"), "*.csproj", SearchOption.AllDirectories);
ResetProject(projectFiles);
// Open them and convert them to source projects
List<SourceProject> projects = projectFiles.Select(x => ProjectRootElement.Open(x, ProjectCollection.GlobalProjectCollection, true))
.Select(x => new SourceProject(x, repo.Info.WorkingDirectory))
.ToList();
if (!resetmode)
{
CaclulateProjectVersionNumber(projects, repo);
UpdateVersionNumbers(projects);
CreateBuildScript(projects, root);
foreach (SourceProject p in projects)
{
Console.WriteLine($"{p.Name} {p.FinalVersionNumber}");
}
}
}
private static void CreateBuildScript(IEnumerable<SourceProject> projects, string root)
{
string outputDir = Path.GetFullPath(Path.Combine(root, @"artifacts\bin\ImageSharp"));
StringBuilder sb = new StringBuilder();
foreach (SourceProject p in projects)
{
sb.AppendLine($@"dotnet pack --configuration Release --output ""{outputDir}"" ""{p.ProjectFilePath}""");
}
File.WriteAllText("build-inner.cmd", sb.ToString());
}
private static void UpdateVersionNumbers(IEnumerable<SourceProject> projects)
{
foreach (SourceProject p in projects)
{
// create a backup file so we can rollback later without breaking formatting
File.Copy(p.FullProjectFilePath, $"{p.FullProjectFilePath}.bak", true);
}
foreach (SourceProject p in projects)
{
// TODO force update of all dependent projects to point to the newest build.
// we skip the build number and standard CI prefix on first commits
string newVersion = p.FinalVersionNumber;
p.UpdateVersion(newVersion);
}
}
private static string CurrentBranch(Repository repo)
{
// lets build version friendly commit
string branch = repo.Head.FriendlyName;
// lets see if we are running in appveyor and if we are use the environment variables instead of the head
string appveryorBranch = Environment.GetEnvironmentVariable("APPVEYOR_REPO_BRANCH");
if (!string.IsNullOrWhiteSpace(appveryorBranch))
{
branch = appveryorBranch;
}
string prNumber = Environment.GetEnvironmentVariable("APPVEYOR_PULL_REQUEST_NUMBER");
if (!string.IsNullOrWhiteSpace(prNumber))
{
branch = $"PR{int.Parse(prNumber):000}";
}
// this will happen when checking out a comit directly and not a branch (like appveryor does when it builds)
if (branch == "(no branch)")
{
throw new Exception("unable to find branch");
}
// clean branch names (might need to be improved)
branch = branch.Replace("/", "-").Replace("--", "-");
return branch;
}
private static void CaclulateProjectVersionNumber(List<SourceProject> projects, Repository repo)
{
string branch = CurrentBranch(repo);
// populate the dependency chains
projects.ForEach(x => x.PopulateDependencies(projects));
// update the final version based on the repo history and the currentr branch name
projects.ForEach(x => x.CalculateVersion(repo, branch));
}
private static void ResetProject(IEnumerable<string> projectPaths)
{
if (File.Exists("build-inner.cmd"))
{
File.Delete("build-inner.cmd");
}
// revert the project.json change be reverting it but skipp all the git stuff as its not needed
foreach (string p in projectPaths)
{
if (File.Exists($"{p}.bak"))
{
File.Copy($"{p}.bak", p, true);
File.Delete($"{p}.bak");
}
}
}
/// <summary>
/// Project level logic
/// </summary>
public class SourceProject
{
private readonly IEnumerable<string> dependencies;
private readonly ProjectRootElement project;
/// <summary>
/// Initializes a new instance of the <see cref="SourceProject"/> class.
/// </summary>
/// <param name="project">The project.</param>
/// <param name="root">The root.</param>
public SourceProject(ProjectRootElement project, string root)
{
this.Name = project.Properties.FirstOrDefault(x => x.Name == "AssemblyTitle").Value;
this.ProjectDirectory = project.DirectoryPath.Substring(root.Length);
this.ProjectFilePath = project.ProjectFileLocation.File.Substring(root.Length);
this.FullProjectFilePath = Path.GetFullPath(project.ProjectFileLocation.File);
this.Version = new NuGetVersion(project.Properties.FirstOrDefault(x => x.Name == "VersionPrefix").Value);
this.dependencies = project.Items.Where(x => x.ItemType == "ProjectReference").Select(x => Path.GetFullPath(Path.Combine(project.DirectoryPath, x.Include)));
this.FinalVersionNumber = this.Version.ToFullString();
this.project = project;
}
/// <summary>
/// Gets the project directory.
/// </summary>
/// <value>
/// The project directory.
/// </value>
public string ProjectDirectory { get; }
/// <summary>
/// Gets the version.
/// </summary>
/// <value>
/// The version.
/// </value>
public NuGetVersion Version { get; private set; }
/// <summary>
/// Gets the dependent projects.
/// </summary>
/// <value>
/// The dependent projects.
/// </value>
public List<SourceProject> DependentProjects { get; private set; }
/// <summary>
/// Gets the name.
/// </summary>
/// <value>
/// The name.
/// </value>
public string Name { get; private set; }
/// <summary>
/// Gets the project file path.
/// </summary>
/// <value>
/// The project file path.
/// </value>
public string ProjectFilePath { get; private set; }
/// <summary>
/// Gets the commit count since version change.
/// </summary>
/// <value>
/// The commit count since version change.
/// </value>
public int CommitCountSinceVersionChange { get; private set; } = 0;
/// <summary>
/// Gets the full project file path.
/// </summary>
/// <value>
/// The full project file path.
/// </value>
public string FullProjectFilePath { get; private set; }
/// <summary>
/// Gets the final version number.
/// </summary>
/// <value>
/// The final version number.
/// </value>
public string FinalVersionNumber { get; private set; }
/// <summary>
/// Populates the dependencies.
/// </summary>
/// <param name="projects">The projects.</param>
public void PopulateDependencies(IEnumerable<SourceProject> projects)
{
this.DependentProjects = projects.Where(x => this.dependencies.Contains(x.FullProjectFilePath)).ToList();
}
/// <summary>
/// Update the version number in the project file
/// </summary>
/// <param name="versionnumber">the new version number to save.</param>
internal void UpdateVersion(string versionnumber)
{
this.project.AddProperty("VersionPrefix", versionnumber);
this.Version = new NuGetVersion(versionnumber);
this.project.Save();
}
/// <summary>
/// Calculates the version.
/// </summary>
/// <param name="repo">The repo.</param>
/// <param name="branch">The branch.</param>
internal void CalculateVersion(Repository repo, string branch)
{
foreach (Commit c in repo.Commits)
{
if (!this.ApplyCommit(c, repo))
{
// we have finished lets populate the final version number
this.FinalVersionNumber = this.CalculateVersionNumber(branch);
return;
}
}
}
private bool MatchPath(string path)
{
if (path.StartsWith(this.ProjectDirectory, StringComparison.OrdinalIgnoreCase))
{
return true;
}
if (this.DependentProjects.Any())
{
return this.DependentProjects.Any(x => x.MatchPath(path));
}
return false;
}
private bool ApplyCommitInternal(Commit commit, TreeChanges changes, Repository repo)
{
this.CommitCountSinceVersionChange++;
// return false if this is a version number root
TreeEntryChanges projectFileChange = changes.Where(x => x.Path?.Equals(this.ProjectFilePath, StringComparison.OrdinalIgnoreCase) == true).FirstOrDefault();
if (projectFileChange != null)
{
if (projectFileChange.Status == ChangeKind.Added)
{
// the version must have been set here
return false;
}
else
{
Blob blob = repo.Lookup<Blob>(projectFileChange.Oid);
using (Stream s = blob.GetContentStream())
{
using (XmlReader reader = XmlReader.Create(s))
{
ProjectRootElement proj = ProjectRootElement.Create(reader);
NuGetVersion version = new NuGetVersion(proj.Properties.FirstOrDefault(x => x.Name == "VersionPrefix").Value);
if (version != this.Version)
{
// version changed
return false;
}
}
}
}
// version must have been the same lets carry on
return true;
}
return true;
}
private bool ApplyCommit(Commit commit, Repository repo)
{
foreach (Commit parent in commit.Parents)
{
TreeChanges changes = repo.Diff.Compare<TreeChanges>(parent.Tree, commit.Tree);
foreach (TreeEntryChanges change in changes)
{
if (!string.IsNullOrWhiteSpace(change.OldPath))
{
if (this.MatchPath(change.OldPath))
{
return this.ApplyCommitInternal(commit, changes, repo);
}
}
if (!string.IsNullOrWhiteSpace(change.Path))
{
if (this.MatchPath(change.Path))
{
return this.ApplyCommitInternal(commit, changes, repo);
}
}
}
}
return true;
}
private string CalculateVersionNumber(string branch)
{
string version = this.Version.ToFullString();
// master only
if (this.CommitCountSinceVersionChange == 1 && branch == "master")
{
if (this.Version.IsPrerelease)
{
// prerelease always needs the build counter just not on a branch name
return $"{version}-{this.CommitCountSinceVersionChange:00000}";
}
// this is the full release happy path, first commit after changing the version number
return version;
}
string rootSpecialVersion = string.Empty;
if (this.Version.IsPrerelease)
{
// probably a much easy way for doing this but it work sell enough for a build script
string[] parts = version.Split(new[] { '-' }, 2);
version = parts[0];
rootSpecialVersion = parts[1];
}
// if master and the version doesn't manually specify a prerelease tag force one on for CI builds
if (branch == "master")
{
if (!this.Version.IsPrerelease)
{
branch = FallbackTag;
}
else
{
branch = string.Empty;
}
}
if (rootSpecialVersion.Length > 0)
{
rootSpecialVersion = "-" + rootSpecialVersion;
}
if (branch.Length > 0)
{
branch = "-" + branch;
}
int maxLength = 20; // dotnet will fail to populate the package if the tag is > 20
maxLength -= rootSpecialVersion.Length; // this is a required tag
maxLength -= 7; // for the counter and dashes
if (branch.Length > maxLength)
{
branch = branch.Substring(0, maxLength);
}
return $"{version}{rootSpecialVersion}{branch}-{this.CommitCountSinceVersionChange:00000}";
}
}
}
}

8
build/Properties/launchSettings.json

@ -1,8 +0,0 @@
{
"profiles": {
"build": {
"commandName": "Project",
"commandLineArgs": "reset"
}
}
}

18
build/build.cmd

@ -1,18 +0,0 @@
@echo Off
set buildRoot="%cd%"
ECHO Restoring packages
dotnet restore
ECHO Updating version numbers and generating build script
cd %~dp0
dotnet run -- update
cd %buildRoot%
ECHO Building package
call %~dp0build-inner.cmd
ECHO Reset version numbers
cd %~dp0
dotnet run -- reset
cd %buildRoot%

16
build/build.csproj

@ -1,16 +0,0 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netcoreapp1.1</TargetFramework>
<DebugType>portable</DebugType>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<AssemblyName>build</AssemblyName>
<OutputType>Exe</OutputType>
<PackageId>build</PackageId>
<CodeAnalysisRuleSet>..\ImageSharp.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.DotNet.ProjectModel" Version="1.0.0-rc3-1-003177" />
<PackageReference Include="Microsoft.Build" Version="15.1.548" />
<PackageReference Include="LibGit2Sharp.Portable" Version="0.24.10" />
</ItemGroup>
</Project>

8
build/reset-versions.cmd

@ -1,8 +0,0 @@
@echo Off
set buildRoot="%cd%"
cd %~dp0
dotnet run -- reset
cd %buildRoot%

60
samples/AvatarWithRoundedCorner/Program.cs

@ -1,13 +1,16 @@

// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
using System;
using System.Numerics;
using SixLabors.ImageSharp;
using SixLabors.ImageSharp.PixelFormats;
using SixLabors.ImageSharp.Processing;
using SixLabors.Primitives;
using SixLabors.Shapes;
namespace AvatarWithRoundedCorner
{
using System;
using System.Numerics;
using ImageSharp;
using SixLabors.Primitives;
using SixLabors.Shapes;
static class Program
{
static void Main(string[] args)
@ -16,9 +19,9 @@ namespace AvatarWithRoundedCorner
using (var img = Image.Load("fb.jpg"))
{
// as generate returns a new IImage make sure we dispose of it
using (Image<Rgba32> dest = img.Clone(x => x.ConvertToAvatar(new Size(200, 200), 20)))
using (Image<Rgba32> destRound = img.Clone(x => x.ConvertToAvatar(new Size(200, 200), 20)))
{
dest.Save("output/fb.png");
destRound.Save("output/fb.png");
}
using (Image<Rgba32> destRound = img.Clone(x => x.ConvertToAvatar(new Size(200, 200), 100)))
@ -30,22 +33,47 @@ namespace AvatarWithRoundedCorner
{
destRound.Save("output/fb-rounder.png");
}
using (Image<Rgba32> destRound = img.CloneAndConvertToAvatarWithoutApply(new Size(200, 200), 150))
{
destRound.Save("output/fb-rounder-without-apply.png");
}
// the original `img` object has not been altered at all.
}
}
// lets create our custom image mutating pipeline
private static IImageProcessingContext<Rgba32> ConvertToAvatar(this IImageProcessingContext<Rgba32> operations, Size size, float cornerRadius)
// 1. The short way:
// Implements a full image mutating pipeline operating on IImageProcessingContext<Rgba32>
// We need the dimensions of the resized image to deduce 'IPathCollection' needed to build the corners,
// so we implement an "inline" image processor by utilizing 'ImageExtensions.Apply()'
private static IImageProcessingContext<Rgba32> ConvertToAvatar(this IImageProcessingContext<Rgba32> processingContext, Size size, float cornerRadius)
{
return operations.Resize(new ImageSharp.Processing.ResizeOptions
return processingContext.Resize(new ResizeOptions
{
Size = size,
Mode = ImageSharp.Processing.ResizeMode.Crop
Mode = ResizeMode.Crop
}).Apply(i => ApplyRoundedCorners(i, cornerRadius));
}
// the combination of `IImageOperations.Run()` + this could be replaced with an `IImageProcessor`
// 2. A more verbose way, avoiding 'Apply()':
// First we create a resized clone of the image, then we draw the corners on that instance with Mutate().
private static Image<Rgba32> CloneAndConvertToAvatarWithoutApply(this Image<Rgba32> image, Size size, float cornerRadius)
{
Image<Rgba32> result = image.Clone(
ctx => ctx.Resize(
new ResizeOptions
{
Size = size,
Mode = ResizeMode.Crop
}));
ApplyRoundedCorners(result, cornerRadius);
return result;
}
// This method can be seen as an inline implementation of an `IImageProcessor`:
// (The combination of `IImageOperations.Apply()` + this could be replaced with an `IImageProcessor`)
public static void ApplyRoundedCorners(Image<Rgba32> img, float cornerRadius)
{
IPathCollection corners = BuildCorners(img.Width, img.Height, cornerRadius);
@ -53,7 +81,7 @@ namespace AvatarWithRoundedCorner
// mutating in here as we already have a cloned original
img.Mutate(x => x.Fill(Rgba32.Transparent, corners, new GraphicsOptions(true)
{
BlenderMode = ImageSharp.PixelFormats.PixelBlenderMode.Src // enforces that any part of this shape that has color is punched out of the background
BlenderMode = PixelBlenderMode.Src // enforces that any part of this shape that has color is punched out of the background
}));
}

11
samples/ChangeDefaultEncoderOptions/Program.cs

@ -1,6 +1,9 @@
using System;
using ImageSharp;
using ImageSharp.Formats;
// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
using System;
using SixLabors.ImageSharp;
using SixLabors.ImageSharp.Formats;
namespace ChangeDefaultEncoderOptions
{
@ -10,7 +13,7 @@ namespace ChangeDefaultEncoderOptions
{
// lets switch out the default encoder for jpeg to one
// that saves at 90 quality and ignores the matadata
Configuration.Default.SetEncoder(ImageFormats.Jpeg, new ImageSharp.Formats.JpegEncoder()
Configuration.Default.SetEncoder(ImageFormats.Jpeg, new JpegEncoder()
{
Quality = 90,
IgnoreMetadata = true

10
src/ImageSharp.Drawing/Brushes/Brushes.cs

@ -1,12 +1,10 @@
// <copyright file="Brushes.cs" company="James Jackson-South">
// Copyright (c) James Jackson-South and contributors.
// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
// </copyright>
namespace ImageSharp.Drawing.Brushes
{
using ImageSharp.PixelFormats;
using SixLabors.ImageSharp.PixelFormats;
namespace SixLabors.ImageSharp.Drawing.Brushes
{
/// <summary>
/// A collection of methods for creating generic brushes.
/// </summary>

14
src/ImageSharp.Drawing/Brushes/IBrush.cs

@ -1,14 +1,12 @@
// <copyright file="IBrush.cs" company="James Jackson-South">
// Copyright (c) James Jackson-South and contributors.
// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
// </copyright>
namespace ImageSharp.Drawing
{
using ImageSharp.PixelFormats;
using Processors;
using SixLabors.Primitives;
using SixLabors.ImageSharp.Drawing.Processors;
using SixLabors.ImageSharp.PixelFormats;
using SixLabors.Primitives;
namespace SixLabors.ImageSharp.Drawing
{
/// <summary>
/// Brush represents a logical configuration of a brush which can be used to source pixel colors
/// </summary>

19
src/ImageSharp.Drawing/Brushes/ImageBrush{TPixel}.cs

@ -1,17 +1,14 @@
// <copyright file="ImageBrush{TPixel}.cs" company="James Jackson-South">
// Copyright (c) James Jackson-South and contributors.
// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
// </copyright>
namespace ImageSharp.Drawing.Brushes
{
using System;
using ImageSharp.Memory;
using ImageSharp.PixelFormats;
using Processors;
using SixLabors.Primitives;
using System;
using SixLabors.ImageSharp.Drawing.Processors;
using SixLabors.ImageSharp.Memory;
using SixLabors.ImageSharp.PixelFormats;
using SixLabors.Primitives;
namespace SixLabors.ImageSharp.Drawing.Brushes
{
/// <summary>
/// Provides an implementation of an image brush for painting images within areas.
/// </summary>

21
src/ImageSharp.Drawing/Brushes/PatternBrush{TPixel}.cs

@ -1,18 +1,15 @@
// <copyright file="PatternBrush{TPixel}.cs" company="James Jackson-South">
// Copyright (c) James Jackson-South and contributors.
// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
// </copyright>
namespace ImageSharp.Drawing.Brushes
{
using System;
using System.Numerics;
using ImageSharp.Memory;
using ImageSharp.PixelFormats;
using Processors;
using SixLabors.Primitives;
using System;
using System.Numerics;
using SixLabors.ImageSharp.Drawing.Processors;
using SixLabors.ImageSharp.Memory;
using SixLabors.ImageSharp.PixelFormats;
using SixLabors.Primitives;
namespace SixLabors.ImageSharp.Drawing.Brushes
{
/// <summary>
/// Provides an implementation of a pattern brush for painting patterns.
/// </summary>

15
src/ImageSharp.Drawing/Brushes/Processors/BrushApplicator.cs

@ -1,15 +1,12 @@
// <copyright file="BrushApplicator.cs" company="James Jackson-South">
// Copyright (c) James Jackson-South and contributors.
// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
// </copyright>
namespace ImageSharp.Drawing.Processors
{
using System;
using ImageSharp.Memory;
using ImageSharp.PixelFormats;
using System;
using SixLabors.ImageSharp.Memory;
using SixLabors.ImageSharp.PixelFormats;
namespace SixLabors.ImageSharp.Drawing.Processors
{
/// <summary>
/// primitive that converts a point in to a color for discovering the fill color based on an implementation
/// </summary>

21
src/ImageSharp.Drawing/Brushes/RecolorBrush{TPixel}.cs

@ -1,18 +1,15 @@
// <copyright file="RecolorBrush{TPixel}.cs" company="James Jackson-South">
// Copyright (c) James Jackson-South and contributors.
// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
// </copyright>
namespace ImageSharp.Drawing.Brushes
{
using System;
using System.Numerics;
using ImageSharp.Memory;
using ImageSharp.PixelFormats;
using Processors;
using SixLabors.Primitives;
using System;
using System.Numerics;
using SixLabors.ImageSharp.Drawing.Processors;
using SixLabors.ImageSharp.Memory;
using SixLabors.ImageSharp.PixelFormats;
using SixLabors.Primitives;
namespace SixLabors.ImageSharp.Drawing.Brushes
{
/// <summary>
/// Provides an implementation of a brush that can recolor an image
/// </summary>

21
src/ImageSharp.Drawing/Brushes/SolidBrush{TPixel}.cs

@ -1,18 +1,15 @@
// <copyright file="SolidBrush{TPixel}.cs" company="James Jackson-South">
// Copyright (c) James Jackson-South and contributors.
// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
// </copyright>
namespace ImageSharp.Drawing.Brushes
{
using System;
using System.Numerics;
using ImageSharp.Memory;
using ImageSharp.PixelFormats;
using Processors;
using SixLabors.Primitives;
using System;
using System.Numerics;
using SixLabors.ImageSharp.Drawing.Processors;
using SixLabors.ImageSharp.Memory;
using SixLabors.ImageSharp.PixelFormats;
using SixLabors.Primitives;
namespace SixLabors.ImageSharp.Drawing.Brushes
{
/// <summary>
/// Provides an implementation of a solid brush for painting solid color areas.
/// </summary>

14
src/ImageSharp.Drawing/DrawImage.cs

@ -1,14 +1,12 @@
// <copyright file="DrawImage.cs" company="James Jackson-South">
// Copyright (c) James Jackson-South and contributors.
// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
// </copyright>
namespace ImageSharp
{
using Drawing.Processors;
using ImageSharp.PixelFormats;
using SixLabors.Primitives;
using SixLabors.ImageSharp.Drawing.Processors;
using SixLabors.ImageSharp.PixelFormats;
using SixLabors.Primitives;
namespace SixLabors.ImageSharp
{
/// <summary>
/// Extension methods for the <see cref="Image{TPixel}"/> type.
/// </summary>

16
src/ImageSharp.Drawing/FillRegion.cs

@ -1,15 +1,13 @@
// <copyright file="FillRegion.cs" company="James Jackson-South">
// Copyright (c) James Jackson-South and contributors.
// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
// </copyright>
namespace ImageSharp
{
using Drawing;
using Drawing.Brushes;
using Drawing.Processors;
using ImageSharp.PixelFormats;
using SixLabors.ImageSharp.Drawing;
using SixLabors.ImageSharp.Drawing.Brushes;
using SixLabors.ImageSharp.Drawing.Processors;
using SixLabors.ImageSharp.PixelFormats;
namespace SixLabors.ImageSharp
{
/// <summary>
/// Extension methods for the <see cref="Image{TPixel}"/> type.
/// </summary>

20
src/ImageSharp.Drawing/ImageSharp.Drawing.csproj

@ -3,18 +3,18 @@
<Description>An extension to ImageSharp that allows the drawing of images, paths, and text.</Description>
<AssemblyTitle>ImageSharp.Drawing</AssemblyTitle>
<VersionPrefix>1.0.0-alpha9</VersionPrefix>
<Authors>James Jackson-South and contributors</Authors>
<Authors>Six Labor and contributors</Authors>
<TargetFramework>netstandard1.1</TargetFramework>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<AssemblyName>ImageSharp.Drawing</AssemblyName>
<PackageId>ImageSharp.Drawing</PackageId>
<AssemblyName>SixLabors.ImageSharp.Drawing</AssemblyName>
<PackageId>SixLabors.ImageSharp.Drawing</PackageId>
<PackageTags>Image Draw Shape Path Font</PackageTags>
<PackageIconUrl>https://raw.githubusercontent.com/JimBobSquarePants/ImageSharp/master/build/icons/imagesharp-logo-128.png</PackageIconUrl>
<PackageProjectUrl>https://github.com/JimBobSquarePants/ImageSharp</PackageProjectUrl>
<PackageIconUrl>https://raw.githubusercontent.com/SixLabor/ImageSharp/master/build/icons/imagesharp-logo-128.png</PackageIconUrl>
<PackageProjectUrl>https://github.com/SixLabors/ImageSharp</PackageProjectUrl>
<PackageLicenseUrl>http://www.apache.org/licenses/LICENSE-2.0</PackageLicenseUrl>
<RepositoryType>git</RepositoryType>
<RepositoryUrl>https://github.com/JimBobSquarePants/ImageSharp</RepositoryUrl>
<RepositoryUrl>https://github.com/SixLabor/ImageSharp</RepositoryUrl>
<GenerateAssemblyDescriptionAttribute>false</GenerateAssemblyDescriptionAttribute>
<GenerateAssemblyConfigurationAttribute>false</GenerateAssemblyConfigurationAttribute>
<GenerateAssemblyCompanyAttribute>false</GenerateAssemblyCompanyAttribute>
@ -30,19 +30,21 @@
</PropertyGroup>
<ItemGroup>
<Compile Include="..\Shared\*.cs" Exclude="bin\**;obj\**;**\*.xproj;packages\**" />
<AdditionalFiles Include="..\Shared\stylecop.json" />
<AdditionalFiles Include="..\..\stylecop.json" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\ImageSharp\ImageSharp.csproj" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="SixLabors.Shapes.Text" Version="0.1.0-alpha0018" />
<PackageReference Include="StyleCop.Analyzers" Version="1.1.0-beta001">
<PackageReference Include="SixLabors.Shapes.Text" Version="0.1.0-alpha0019" />
<PackageReference Include="SixLabors.Shapes" Version="0.1.0-alpha0019" />
<PackageReference Include="StyleCop.Analyzers" Version="1.1.0-beta004">
<PrivateAssets>All</PrivateAssets>
</PackageReference>
</ItemGroup>
<PropertyGroup>
<CodeAnalysisRuleSet>..\..\ImageSharp.ruleset</CodeAnalysisRuleSet>
<RootNamespace>SixLabors.ImageSharp.Drawing</RootNamespace>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>

22
src/ImageSharp.Drawing/Paths/DrawBeziers.cs

@ -1,18 +1,16 @@
// <copyright file="DrawBeziers.cs" company="James Jackson-South">
// Copyright (c) James Jackson-South and contributors.
// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
// </copyright>
namespace ImageSharp
{
using System.Numerics;
using Drawing;
using Drawing.Brushes;
using Drawing.Pens;
using ImageSharp.PixelFormats;
using SixLabors.Primitives;
using SixLabors.Shapes;
using System.Numerics;
using SixLabors.ImageSharp.Drawing;
using SixLabors.ImageSharp.Drawing.Brushes;
using SixLabors.ImageSharp.Drawing.Pens;
using SixLabors.ImageSharp.PixelFormats;
using SixLabors.Primitives;
using SixLabors.Shapes;
namespace SixLabors.ImageSharp
{
/// <summary>
/// Extension methods for the <see cref="Image{TPixel}"/> type.
/// </summary>

22
src/ImageSharp.Drawing/Paths/DrawLines.cs

@ -1,18 +1,16 @@
// <copyright file="DrawLines.cs" company="James Jackson-South">
// Copyright (c) James Jackson-South and contributors.
// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
// </copyright>
namespace ImageSharp
{
using System.Numerics;
using Drawing;
using Drawing.Brushes;
using Drawing.Pens;
using ImageSharp.PixelFormats;
using SixLabors.Primitives;
using SixLabors.Shapes;
using System.Numerics;
using SixLabors.ImageSharp.Drawing;
using SixLabors.ImageSharp.Drawing.Brushes;
using SixLabors.ImageSharp.Drawing.Pens;
using SixLabors.ImageSharp.PixelFormats;
using SixLabors.Primitives;
using SixLabors.Shapes;
namespace SixLabors.ImageSharp
{
/// <summary>
/// Extension methods for the <see cref="Image{TPixel}"/> type.
/// </summary>

18
src/ImageSharp.Drawing/Paths/DrawPath.cs

@ -1,16 +1,14 @@
// <copyright file="DrawPath.cs" company="James Jackson-South">
// Copyright (c) James Jackson-South and contributors.
// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
// </copyright>
namespace ImageSharp
{
using Drawing;
using Drawing.Brushes;
using Drawing.Pens;
using ImageSharp.PixelFormats;
using SixLabors.Shapes;
using SixLabors.ImageSharp.Drawing;
using SixLabors.ImageSharp.Drawing.Brushes;
using SixLabors.ImageSharp.Drawing.Pens;
using SixLabors.ImageSharp.PixelFormats;
using SixLabors.Shapes;
namespace SixLabors.ImageSharp
{
/// <summary>
/// Extension methods for the <see cref="Image{TPixel}"/> type.
/// </summary>

18
src/ImageSharp.Drawing/Paths/DrawPathCollection.cs

@ -1,16 +1,14 @@
// <copyright file="DrawPath.cs" company="James Jackson-South">
// Copyright (c) James Jackson-South and contributors.
// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
// </copyright>
namespace ImageSharp
{
using Drawing;
using Drawing.Brushes;
using Drawing.Pens;
using ImageSharp.PixelFormats;
using SixLabors.Shapes;
using SixLabors.ImageSharp.Drawing;
using SixLabors.ImageSharp.Drawing.Brushes;
using SixLabors.ImageSharp.Drawing.Pens;
using SixLabors.ImageSharp.PixelFormats;
using SixLabors.Shapes;
namespace SixLabors.ImageSharp
{
/// <summary>
/// Extension methods for the <see cref="Image{TPixel}"/> type.
/// </summary>

22
src/ImageSharp.Drawing/Paths/DrawPolygon.cs

@ -1,18 +1,16 @@
// <copyright file="DrawPolygon.cs" company="James Jackson-South">
// Copyright (c) James Jackson-South and contributors.
// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
// </copyright>
namespace ImageSharp
{
using System.Numerics;
using Drawing;
using Drawing.Brushes;
using Drawing.Pens;
using ImageSharp.PixelFormats;
using SixLabors.Primitives;
using SixLabors.Shapes;
using System.Numerics;
using SixLabors.ImageSharp.Drawing;
using SixLabors.ImageSharp.Drawing.Brushes;
using SixLabors.ImageSharp.Drawing.Pens;
using SixLabors.ImageSharp.PixelFormats;
using SixLabors.Primitives;
using SixLabors.Shapes;
namespace SixLabors.ImageSharp
{
/// <summary>
/// Extension methods for the <see cref="Image{TPixel}"/> type.
/// </summary>

18
src/ImageSharp.Drawing/Paths/DrawRectangle.cs

@ -1,16 +1,14 @@
// <copyright file="DrawRectangle.cs" company="James Jackson-South">
// Copyright (c) James Jackson-South and contributors.
// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
// </copyright>
namespace ImageSharp
{
using Drawing;
using Drawing.Brushes;
using Drawing.Pens;
using ImageSharp.PixelFormats;
using SixLabors.Primitives;
using SixLabors.ImageSharp.Drawing;
using SixLabors.ImageSharp.Drawing.Brushes;
using SixLabors.ImageSharp.Drawing.Pens;
using SixLabors.ImageSharp.PixelFormats;
using SixLabors.Primitives;
namespace SixLabors.ImageSharp
{
/// <summary>
/// Extension methods for the <see cref="Image{TPixel}"/> type.
/// </summary>

18
src/ImageSharp.Drawing/Paths/FillPathBuilder.cs

@ -1,16 +1,14 @@
// <copyright file="FillPaths.cs" company="James Jackson-South">
// Copyright (c) James Jackson-South and contributors.
// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
// </copyright>
namespace ImageSharp
{
using System;
using Drawing;
using Drawing.Brushes;
using ImageSharp.PixelFormats;
using SixLabors.Shapes;
using System;
using SixLabors.ImageSharp.Drawing;
using SixLabors.ImageSharp.Drawing.Brushes;
using SixLabors.ImageSharp.PixelFormats;
using SixLabors.Shapes;
namespace SixLabors.ImageSharp
{
/// <summary>
/// Extension methods for the <see cref="Image{TPixel}"/> type.
/// </summary>

16
src/ImageSharp.Drawing/Paths/FillPathCollection.cs

@ -1,15 +1,13 @@
// <copyright file="FillPaths.cs" company="James Jackson-South">
// Copyright (c) James Jackson-South and contributors.
// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
// </copyright>
namespace ImageSharp
{
using Drawing;
using Drawing.Brushes;
using ImageSharp.PixelFormats;
using SixLabors.Shapes;
using SixLabors.ImageSharp.Drawing;
using SixLabors.ImageSharp.Drawing.Brushes;
using SixLabors.ImageSharp.PixelFormats;
using SixLabors.Shapes;
namespace SixLabors.ImageSharp
{
/// <summary>
/// Extension methods for the <see cref="Image{TPixel}"/> type.
/// </summary>

16
src/ImageSharp.Drawing/Paths/FillPaths.cs

@ -1,15 +1,13 @@
// <copyright file="FillPaths.cs" company="James Jackson-South">
// Copyright (c) James Jackson-South and contributors.
// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
// </copyright>
namespace ImageSharp
{
using Drawing;
using Drawing.Brushes;
using ImageSharp.PixelFormats;
using SixLabors.Shapes;
using SixLabors.ImageSharp.Drawing;
using SixLabors.ImageSharp.Drawing.Brushes;
using SixLabors.ImageSharp.PixelFormats;
using SixLabors.Shapes;
namespace SixLabors.ImageSharp
{
/// <summary>
/// Extension methods for the <see cref="Image{TPixel}"/> type.
/// </summary>

22
src/ImageSharp.Drawing/Paths/FillPolygon.cs

@ -1,18 +1,16 @@
// <copyright file="FillPolygon.cs" company="James Jackson-South">
// Copyright (c) James Jackson-South and contributors.
// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
// </copyright>
namespace ImageSharp
{
using System;
using System.Numerics;
using Drawing;
using Drawing.Brushes;
using ImageSharp.PixelFormats;
using SixLabors.Primitives;
using SixLabors.Shapes;
using System;
using System.Numerics;
using SixLabors.ImageSharp.Drawing;
using SixLabors.ImageSharp.Drawing.Brushes;
using SixLabors.ImageSharp.PixelFormats;
using SixLabors.Primitives;
using SixLabors.Shapes;
namespace SixLabors.ImageSharp
{
/// <summary>
/// Extension methods for the <see cref="Image{TPixel}"/> type.
/// </summary>

16
src/ImageSharp.Drawing/Paths/FillRectangle.cs

@ -1,15 +1,13 @@
// <copyright file="FillRectangle.cs" company="James Jackson-South">
// Copyright (c) James Jackson-South and contributors.
// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
// </copyright>
namespace ImageSharp
{
using Drawing;
using Drawing.Brushes;
using ImageSharp.PixelFormats;
using SixLabors.Primitives;
using SixLabors.ImageSharp.Drawing;
using SixLabors.ImageSharp.Drawing.Brushes;
using SixLabors.ImageSharp.PixelFormats;
using SixLabors.Primitives;
namespace SixLabors.ImageSharp
{
/// <summary>
/// Extension methods for the <see cref="Image{TPixel}"/> type.
/// </summary>

17
src/ImageSharp.Drawing/Paths/ShapePath.cs

@ -1,16 +1,13 @@
// <copyright file="ShapeRegion.cs" company="James Jackson-South">
// Copyright (c) James Jackson-South and contributors.
// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
// </copyright>
namespace ImageSharp.Drawing
{
using System;
using System.Buffers;
using System.Numerics;
using SixLabors.Shapes;
using System;
using System.Buffers;
using System.Numerics;
using SixLabors.Shapes;
namespace SixLabors.ImageSharp.Drawing
{
/// <summary>
/// A mapping between a <see cref="IPath"/> and a region.
/// </summary>

20
src/ImageSharp.Drawing/Paths/ShapeRegion.cs

@ -1,17 +1,15 @@
// <copyright file="ShapeRegion.cs" company="James Jackson-South">
// Copyright (c) James Jackson-South and contributors.
// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
// </copyright>
namespace ImageSharp.Drawing
{
using System;
using System.Buffers;
using System.Numerics;
using ImageSharp.Memory;
using SixLabors.Primitives;
using SixLabors.Shapes;
using System;
using System.Buffers;
using System.Numerics;
using SixLabors.ImageSharp.Memory;
using SixLabors.Primitives;
using SixLabors.Shapes;
namespace SixLabors.ImageSharp.Drawing
{
/// <summary>
/// A mapping between a <see cref="IPath"/> and a region.
/// </summary>

12
src/ImageSharp.Drawing/Pens/IPen.cs

@ -1,13 +1,11 @@
// <copyright file="IPen.cs" company="James Jackson-South">
// Copyright (c) James Jackson-South and contributors.
// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
// </copyright>
namespace ImageSharp.Drawing.Pens
{
using ImageSharp.PixelFormats;
using Processors;
using SixLabors.ImageSharp.Drawing.Processors;
using SixLabors.ImageSharp.PixelFormats;
namespace SixLabors.ImageSharp.Drawing.Pens
{
/// <summary>
/// Interface representing a Pen
/// </summary>

10
src/ImageSharp.Drawing/Pens/Pens.cs

@ -1,12 +1,10 @@
// <copyright file="Pens.cs" company="James Jackson-South">
// Copyright (c) James Jackson-South and contributors.
// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
// </copyright>
namespace ImageSharp.Drawing.Pens
{
using ImageSharp.PixelFormats;
using SixLabors.ImageSharp.PixelFormats;
namespace SixLabors.ImageSharp.Drawing.Pens
{
/// <summary>
/// Common Pen styles
/// </summary>

19
src/ImageSharp.Drawing/Pens/Pen{TPixel}.cs

@ -1,17 +1,14 @@
// <copyright file="Pen{TPixel}.cs" company="James Jackson-South">
// Copyright (c) James Jackson-South and contributors.
// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
// </copyright>
namespace ImageSharp.Drawing.Pens
{
using System;
using System.Numerics;
using ImageSharp.Drawing.Brushes;
using ImageSharp.PixelFormats;
using Processors;
using System;
using System.Numerics;
using SixLabors.ImageSharp.Drawing.Brushes;
using SixLabors.ImageSharp.Drawing.Processors;
using SixLabors.ImageSharp.PixelFormats;
namespace SixLabors.ImageSharp.Drawing.Pens
{
/// <summary>
/// Provides a pen that can apply a pattern to a line with a set brush and thickness
/// </summary>

6
src/ImageSharp.Drawing/PointInfo.cs

@ -1,9 +1,7 @@
// <copyright file="PointInfo.cs" company="James Jackson-South">
// Copyright (c) James Jackson-South and contributors.
// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
// </copyright>
namespace ImageSharp.Drawing
namespace SixLabors.ImageSharp.Drawing
{
/// <summary>
/// Returns details about how far away from the inside of a shape and the color the pixel could be.

23
src/ImageSharp.Drawing/Processors/DrawImageProcessor.cs

@ -1,19 +1,16 @@
// <copyright file="DrawImageProcessor.cs" company="James Jackson-South">
// Copyright (c) James Jackson-South and contributors.
// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
// </copyright>
namespace ImageSharp.Drawing.Processors
{
using System;
using System.Numerics;
using System.Threading.Tasks;
using ImageSharp.Memory;
using ImageSharp.PixelFormats;
using ImageSharp.Processing;
using SixLabors.Primitives;
using System;
using System.Numerics;
using System.Threading.Tasks;
using SixLabors.ImageSharp.Memory;
using SixLabors.ImageSharp.PixelFormats;
using SixLabors.ImageSharp.Processing;
using SixLabors.Primitives;
namespace SixLabors.ImageSharp.Drawing.Processors
{
/// <summary>
/// Combines two images together by blending the pixels.
/// </summary>

26
src/ImageSharp.Drawing/Processors/FillProcessor.cs

@ -1,21 +1,17 @@
// <copyright file="FillProcessor.cs" company="James Jackson-South">
// Copyright (c) James Jackson-South and contributors.
// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
// </copyright>
namespace ImageSharp.Drawing.Processors
{
using System;
using System.Numerics;
using System.Threading.Tasks;
using Drawing;
using ImageSharp.Memory;
using ImageSharp.PixelFormats;
using ImageSharp.Processing;
using SixLabors.Primitives;
using System;
using System.Numerics;
using System.Threading.Tasks;
using SixLabors.ImageSharp.Drawing;
using SixLabors.ImageSharp.Memory;
using SixLabors.ImageSharp.PixelFormats;
using SixLabors.ImageSharp.Processing;
using SixLabors.Primitives;
namespace SixLabors.ImageSharp.Drawing.Processors
{
/// <summary>
/// Using the bursh as a source of pixels colors blends the brush color with source.
/// </summary>

25
src/ImageSharp.Drawing/Processors/FillRegionProcessor.cs

@ -1,20 +1,17 @@
// <copyright file="FillRegionProcessor.cs" company="James Jackson-South">
// Copyright (c) James Jackson-South and contributors.
// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
// </copyright>
namespace ImageSharp.Drawing.Processors
{
using System;
using System.Buffers;
using System.Runtime.CompilerServices;
using Drawing;
using ImageSharp.Memory;
using ImageSharp.PixelFormats;
using ImageSharp.Processing;
using SixLabors.Primitives;
using System;
using System.Buffers;
using System.Runtime.CompilerServices;
using SixLabors.ImageSharp.Drawing;
using SixLabors.ImageSharp.Memory;
using SixLabors.ImageSharp.PixelFormats;
using SixLabors.ImageSharp.Processing;
using SixLabors.Primitives;
namespace SixLabors.ImageSharp.Drawing.Processors
{
/// <summary>
/// Usinf a brsuh and a shape fills shape with contents of brush the
/// </summary>

4
src/ImageSharp.Drawing/Properties/AssemblyInfo.cs

@ -1,6 +1,4 @@
// <copyright file="AssemblyInfo.cs" company="James Jackson-South">
// Copyright (c) James Jackson-South and contributors.
// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
// </copyright>
// Common values read from `AssemblyInfo.Common.cs`

12
src/ImageSharp.Drawing/Region.cs

@ -1,13 +1,11 @@
// <copyright file="Region.cs" company="James Jackson-South">
// Copyright (c) James Jackson-South and contributors.
// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
// </copyright>
namespace ImageSharp.Drawing
{
using System;
using SixLabors.Primitives;
using System;
using SixLabors.Primitives;
namespace SixLabors.ImageSharp.Drawing
{
/// <summary>
/// Represents a region of an image.
/// </summary>

23
src/ImageSharp.Drawing/Text/DrawText.Path.cs

@ -1,19 +1,16 @@
// <copyright file="DrawText.cs" company="James Jackson-South">
// Copyright (c) James Jackson-South and contributors.
// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
// </copyright>
namespace ImageSharp
{
using System.Numerics;
using Drawing;
using Drawing.Brushes;
using Drawing.Pens;
using ImageSharp.PixelFormats;
using SixLabors.Fonts;
using SixLabors.Shapes;
using System.Numerics;
using SixLabors.Fonts;
using SixLabors.ImageSharp.Drawing;
using SixLabors.ImageSharp.Drawing.Brushes;
using SixLabors.ImageSharp.Drawing.Pens;
using SixLabors.ImageSharp.PixelFormats;
using SixLabors.Shapes;
namespace SixLabors.ImageSharp
{
/// <summary>
/// Extension methods for the <see cref="Image{TPixel}"/> type.
/// </summary>

25
src/ImageSharp.Drawing/Text/DrawText.cs

@ -1,20 +1,17 @@
// <copyright file="DrawText.cs" company="James Jackson-South">
// Copyright (c) James Jackson-South and contributors.
// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
// </copyright>
namespace ImageSharp
{
using System.Numerics;
using Drawing;
using Drawing.Brushes;
using Drawing.Pens;
using ImageSharp.PixelFormats;
using SixLabors.Fonts;
using SixLabors.Primitives;
using SixLabors.Shapes;
using System.Numerics;
using SixLabors.Fonts;
using SixLabors.ImageSharp.Drawing;
using SixLabors.ImageSharp.Drawing.Brushes;
using SixLabors.ImageSharp.Drawing.Pens;
using SixLabors.ImageSharp.PixelFormats;
using SixLabors.Primitives;
using SixLabors.Shapes;
namespace SixLabors.ImageSharp
{
/// <summary>
/// Extension methods for the <see cref="Image{TPixel}"/> type.
/// </summary>

12
src/ImageSharp.Drawing/Text/TextGraphicsOptions.cs

@ -1,12 +1,10 @@
// <copyright file="TextGraphicsOptions.cs" company="James Jackson-South">
// Copyright (c) James Jackson-South and contributors.
// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
// </copyright>
namespace ImageSharp.Drawing
{
using ImageSharp.PixelFormats;
using SixLabors.Fonts;
using SixLabors.Fonts;
using SixLabors.ImageSharp.PixelFormats;
namespace SixLabors.ImageSharp.Drawing
{
/// <summary>
/// Options for influencing the drawing functions.
/// </summary>

48
src/ImageSharp/ApplyProcessors.cs

@ -1,27 +1,23 @@
// <copyright file="ApplyProcessors.cs" company="James Jackson-South">
// Copyright (c) James Jackson-South and contributors.
// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
// </copyright>
namespace ImageSharp
{
using System;
using ImageSharp.PixelFormats;
using ImageSharp.Processing;
using System;
using SixLabors.ImageSharp.PixelFormats;
using SixLabors.ImageSharp.Processing;
namespace SixLabors.ImageSharp
{
/// <summary>
/// Extension methods for the <see cref="Image{TPixel}"/> type.
/// </summary>
public static partial class ImageExtensions
{
/// <summary>
/// Mutates the image by applying the image operation to it.
/// Mutates the source image by applying the image operation to it.
/// </summary>
/// <typeparam name="TPixel">The pixel format.</typeparam>
/// <param name="source">The image to rotate, flip, or both.</param>
/// <param name="operation">The operations to perform on the source.</param>
/// <param name="source">The image to mutate.</param>
/// <param name="operation">The operation to perform on the source.</param>
public static void Mutate<TPixel>(this Image<TPixel> source, Action<IImageProcessingContext<TPixel>> operation)
where TPixel : struct, IPixel<TPixel>
{
@ -34,10 +30,10 @@ namespace ImageSharp
}
/// <summary>
/// Mutates the image by applying the operations to it.
/// Mutates the source image by applying the operations to it.
/// </summary>
/// <typeparam name="TPixel">The pixel format.</typeparam>
/// <param name="source">The image to rotate, flip, or both.</param>
/// <param name="source">The image to mutate.</param>
/// <param name="operations">The operations to perform on the source.</param>
public static void Mutate<TPixel>(this Image<TPixel> source, params IImageProcessor<TPixel>[] operations)
where TPixel : struct, IPixel<TPixel>
@ -51,12 +47,12 @@ namespace ImageSharp
}
/// <summary>
/// Clones the current image mutating the clone by applying the operation to it.
/// Creates a deep clone of the current image. The clone is then mutated by the given operation.
/// </summary>
/// <typeparam name="TPixel">The pixel format.</typeparam>
/// <param name="source">The image to rotate, flip, or both.</param>
/// <param name="operation">The operations to perform on the source.</param>
/// <returns>Anew Image which has teh data from the <paramref name="source"/> but with the <paramref name="operation"/> applied.</returns>
/// <param name="source">The image to clone.</param>
/// <param name="operation">The operation to perform on the clone.</param>
/// <returns>The new <see cref="Image{TPixel}"/></returns>
public static Image<TPixel> Clone<TPixel>(this Image<TPixel> source, Action<IImageProcessingContext<TPixel>> operation)
where TPixel : struct, IPixel<TPixel>
{
@ -69,12 +65,12 @@ namespace ImageSharp
}
/// <summary>
/// Clones the current image mutating the clone by applying the operations to it.
/// Creates a deep clone of the current image. The clone is then mutated by the given operations.
/// </summary>
/// <typeparam name="TPixel">The pixel format.</typeparam>
/// <param name="source">The image to rotate, flip, or both.</param>
/// <param name="operations">The operations to perform on the source.</param>
/// <returns>Anew Image which has teh data from the <paramref name="source"/> but with the <paramref name="operations"/> applied.</returns>
/// <param name="source">The image to clone.</param>
/// <param name="operations">The operations to perform on the clone.</param>
/// <returns>The new <see cref="Image{TPixel}"/></returns>
public static Image<TPixel> Clone<TPixel>(this Image<TPixel> source, params IImageProcessor<TPixel>[] operations)
where TPixel : struct, IPixel<TPixel>
{
@ -87,12 +83,12 @@ namespace ImageSharp
}
/// <summary>
/// Applies all the ImageProcessors agains the operation
/// Applies the given <see cref="IImageProcessor{TPixel}"/> collection against the context
/// </summary>
/// <typeparam name="TPixel">The pixel format.</typeparam>
/// <param name="source">The image to rotate, flip, or both.</param>
/// <param name="source">The image processing context.</param>
/// <param name="operations">The operations to perform on the source.</param>
/// <returns>returns the current operations class to allow chaining of operations.</returns>
/// <returns>The <see cref="IImageProcessingContext{TPixel}"/> to allow chaining of operations.</returns>
public static IImageProcessingContext<TPixel> ApplyProcessors<TPixel>(this IImageProcessingContext<TPixel> source, params IImageProcessor<TPixel>[] operations)
where TPixel : struct, IPixel<TPixel>
{

16
src/ImageSharp/ColorSpaces/CieLab.cs

@ -1,15 +1,13 @@
// <copyright file="CieLab.cs" company="James Jackson-South">
// Copyright (c) James Jackson-South and contributors.
// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
// </copyright>
namespace ImageSharp.ColorSpaces
{
using System;
using System.ComponentModel;
using System.Numerics;
using System.Runtime.CompilerServices;
using System;
using System.ComponentModel;
using System.Numerics;
using System.Runtime.CompilerServices;
namespace SixLabors.ImageSharp.ColorSpaces
{
/// <summary>
/// Represents a CIE L*a*b* 1976 color.
/// <see href="https://en.wikipedia.org/wiki/Lab_color_space"/>

16
src/ImageSharp/ColorSpaces/CieLch.cs

@ -1,15 +1,13 @@
// <copyright file="CieLch.cs" company="James Jackson-South">
// Copyright (c) James Jackson-South and contributors.
// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
// </copyright>
namespace ImageSharp.ColorSpaces
{
using System;
using System.ComponentModel;
using System.Numerics;
using System.Runtime.CompilerServices;
using System;
using System.ComponentModel;
using System.Numerics;
using System.Runtime.CompilerServices;
namespace SixLabors.ImageSharp.ColorSpaces
{
/// <summary>
/// Represents the CIE L*C*h°, cylindrical form of the CIE L*a*b* 1976 color.
/// <see href="https://en.wikipedia.org/wiki/Lab_color_space#Cylindrical_representation:_CIELCh_or_CIEHLC"/>

16
src/ImageSharp/ColorSpaces/CieLchuv.cs

@ -1,15 +1,13 @@
// <copyright file="CieLchuv.cs" company="James Jackson-South">
// Copyright (c) James Jackson-South and contributors.
// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
// </copyright>
namespace ImageSharp.ColorSpaces
{
using System;
using System.ComponentModel;
using System.Numerics;
using System.Runtime.CompilerServices;
using System;
using System.ComponentModel;
using System.Numerics;
using System.Runtime.CompilerServices;
namespace SixLabors.ImageSharp.ColorSpaces
{
/// <summary>
/// Represents the CIE L*C*h°, cylindrical form of the CIE L*u*v* 1976 color.
/// <see href="https://en.wikipedia.org/wiki/Lab_color_space#Cylindrical_representation:_CieLchuv_or_CIEHLC"/>

16
src/ImageSharp/ColorSpaces/CieLuv.cs

@ -1,15 +1,13 @@
// <copyright file="CieLuv.cs" company="James Jackson-South">
// Copyright (c) James Jackson-South and contributors.
// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
// </copyright>
namespace ImageSharp.ColorSpaces
{
using System;
using System.ComponentModel;
using System.Numerics;
using System.Runtime.CompilerServices;
using System;
using System.ComponentModel;
using System.Numerics;
using System.Runtime.CompilerServices;
namespace SixLabors.ImageSharp.ColorSpaces
{
/// <summary>
/// The CIE 1976 (L*, u*, v*) color space, commonly known by its abbreviation CIELUV, is a color space adopted by the International
/// Commission on Illumination (CIE) in 1976, as a simple-to-compute transformation of the 1931 CIE XYZ color space, but which

16
src/ImageSharp/ColorSpaces/CieXyChromaticityCoordinates.cs

@ -1,15 +1,13 @@
// <copyright file="CieXyChromaticityCoordinates.cs" company="James Jackson-South">
// Copyright (c) James Jackson-South and contributors.
// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
// </copyright>
namespace ImageSharp.ColorSpaces
{
using System;
using System.ComponentModel;
using System.Numerics;
using System.Runtime.CompilerServices;
using System;
using System.ComponentModel;
using System.Numerics;
using System.Runtime.CompilerServices;
namespace SixLabors.ImageSharp.ColorSpaces
{
/// <summary>
/// Represents the coordinates of CIEXY chromaticity space
/// </summary>

16
src/ImageSharp/ColorSpaces/CieXyy.cs

@ -1,15 +1,13 @@
// <copyright file="CieXyy.cs" company="James Jackson-South">
// Copyright (c) James Jackson-South and contributors.
// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
// </copyright>
namespace ImageSharp.ColorSpaces
{
using System;
using System.ComponentModel;
using System.Numerics;
using System.Runtime.CompilerServices;
using System;
using System.ComponentModel;
using System.Numerics;
using System.Runtime.CompilerServices;
namespace SixLabors.ImageSharp.ColorSpaces
{
/// <summary>
/// Represents an CIE xyY 1931 color
/// <see href="https://en.wikipedia.org/wiki/CIE_1931_color_space#CIE_xy_chromaticity_diagram_and_the_CIE_xyY_color_space"/>

16
src/ImageSharp/ColorSpaces/CieXyz.cs

@ -1,15 +1,13 @@
// <copyright file="CieXyz.cs" company="James Jackson-South">
// Copyright (c) James Jackson-South and contributors.
// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
// </copyright>
namespace ImageSharp.ColorSpaces
{
using System;
using System.ComponentModel;
using System.Numerics;
using System.Runtime.CompilerServices;
using System;
using System.ComponentModel;
using System.Numerics;
using System.Runtime.CompilerServices;
namespace SixLabors.ImageSharp.ColorSpaces
{
/// <summary>
/// Represents an CIE XYZ 1931 color
/// <see href="https://en.wikipedia.org/wiki/CIE_1931_color_space#Definition_of_the_CIE_XYZ_color_space"/>

16
src/ImageSharp/ColorSpaces/Cmyk.cs

@ -1,15 +1,13 @@
// <copyright file="Cmyk.cs" company="James Jackson-South">
// Copyright (c) James Jackson-South and contributors.
// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
// </copyright>
namespace ImageSharp.ColorSpaces
{
using System;
using System.ComponentModel;
using System.Numerics;
using System.Runtime.CompilerServices;
using System;
using System.ComponentModel;
using System.Numerics;
using System.Runtime.CompilerServices;
namespace SixLabors.ImageSharp.ColorSpaces
{
/// <summary>
/// Represents an CMYK (cyan, magenta, yellow, keyline) color.
/// </summary>

6
src/ImageSharp/ColorSpaces/Conversion/CieConstants.cs

@ -1,9 +1,7 @@
// <copyright file="CieConstants.cs" company="James Jackson-South">
// Copyright (c) James Jackson-South and contributors.
// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
// </copyright>
namespace ImageSharp.ColorSpaces.Conversion
namespace SixLabors.ImageSharp.ColorSpaces.Conversion
{
/// <summary>
/// Constants use for Cie conversion calculations

15
src/ImageSharp/ColorSpaces/Conversion/ColorSpaceConverter.Adapt.cs

@ -1,15 +1,12 @@
// <copyright file="ColorSpaceConverter.cs" company="James Jackson-South">
// Copyright (c) James Jackson-South and contributors.
// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
// </copyright>
namespace ImageSharp.ColorSpaces.Conversion
{
using System;
using ImageSharp.ColorSpaces;
using ImageSharp.ColorSpaces.Conversion.Implementation.Rgb;
using System;
using SixLabors.ImageSharp.ColorSpaces;
using SixLabors.ImageSharp.ColorSpaces.Conversion.Implementation.RgbColorSapce;
namespace SixLabors.ImageSharp.ColorSpaces.Conversion
{
/// <content>
/// Performs chromatic adaptation on the various color spaces.
/// </content>

14
src/ImageSharp/ColorSpaces/Conversion/ColorSpaceConverter.CieLab.cs

@ -1,14 +1,12 @@
// <copyright file="ColorSpaceConverter.cs" company="James Jackson-South">
// Copyright (c) James Jackson-South and contributors.
// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
// </copyright>
namespace ImageSharp.ColorSpaces.Conversion
{
using ImageSharp.ColorSpaces;
using ImageSharp.ColorSpaces.Conversion.Implementation.CieLab;
using ImageSharp.ColorSpaces.Conversion.Implementation.CieLch;
using SixLabors.ImageSharp.ColorSpaces;
using SixLabors.ImageSharp.ColorSpaces.Conversion.Implementation.CieLabColorSapce;
using SixLabors.ImageSharp.ColorSpaces.Conversion.Implementation.CieLchColorSapce;
namespace SixLabors.ImageSharp.ColorSpaces.Conversion
{
/// <content>
/// Allows conversion to <see cref="CieLab"/>.
/// </content>

10
src/ImageSharp/ColorSpaces/Conversion/ColorSpaceConverter.CieLch.cs

@ -1,12 +1,10 @@
// <copyright file="ColorSpaceConverter.cs" company="James Jackson-South">
// Copyright (c) James Jackson-South and contributors.
// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
// </copyright>
namespace ImageSharp.ColorSpaces.Conversion
{
using ImageSharp.ColorSpaces.Conversion.Implementation.CieLch;
using SixLabors.ImageSharp.ColorSpaces.Conversion.Implementation.CieLchColorSapce;
namespace SixLabors.ImageSharp.ColorSpaces.Conversion
{
/// <content>
/// Allows conversion to <see cref="CieLch"/>.
/// </content>

10
src/ImageSharp/ColorSpaces/Conversion/ColorSpaceConverter.CieLchuv.cs

@ -1,12 +1,10 @@
// <copyright file="ColorSpaceConverter.cs" company="James Jackson-South">
// Copyright (c) James Jackson-South and contributors.
// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
// </copyright>
namespace ImageSharp.ColorSpaces.Conversion
{
using ImageSharp.ColorSpaces.Conversion.Implementation.CieLchuv;
using SixLabors.ImageSharp.ColorSpaces.Conversion.Implementation.CieLchuvColorSapce;
namespace SixLabors.ImageSharp.ColorSpaces.Conversion
{
/// <content>
/// Allows conversion to <see cref="CieLchuv"/>.
/// </content>

14
src/ImageSharp/ColorSpaces/Conversion/ColorSpaceConverter.CieLuv.cs

@ -1,14 +1,12 @@
// <copyright file="ColorSpaceConverter.cs" company="James Jackson-South">
// Copyright (c) James Jackson-South and contributors.
// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
// </copyright>
namespace ImageSharp.ColorSpaces.Conversion
{
using ImageSharp.ColorSpaces;
using ImageSharp.ColorSpaces.Conversion.Implementation.CieLchuv;
using ImageSharp.ColorSpaces.Conversion.Implementation.CieLuv;
using SixLabors.ImageSharp.ColorSpaces;
using SixLabors.ImageSharp.ColorSpaces.Conversion.Implementation.CieLchuvColorSapce;
using SixLabors.ImageSharp.ColorSpaces.Conversion.Implementation.CieLuvColorSapce;
namespace SixLabors.ImageSharp.ColorSpaces.Conversion
{
/// <content>
/// Allows conversion to <see cref="CieLuv"/>.
/// </content>

10
src/ImageSharp/ColorSpaces/Conversion/ColorSpaceConverter.CieXyy.cs

@ -1,12 +1,10 @@
// <copyright file="ColorSpaceConverter.cs" company="James Jackson-South">
// Copyright (c) James Jackson-South and contributors.
// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
// </copyright>
namespace ImageSharp.ColorSpaces.Conversion
{
using ImageSharp.ColorSpaces.Conversion.Implementation.CieXyy;
using SixLabors.ImageSharp.ColorSpaces.Conversion.Implementation.CieXyyColorSapce;
namespace SixLabors.ImageSharp.ColorSpaces.Conversion
{
/// <content>
/// Allows conversion to <see cref="CieXyy"/>.
/// </content>

18
src/ImageSharp/ColorSpaces/Conversion/ColorSpaceConverter.CieXyz.cs

@ -1,16 +1,14 @@
// <copyright file="ColorSpaceConverter.cs" company="James Jackson-South">
// Copyright (c) James Jackson-South and contributors.
// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
// </copyright>
namespace ImageSharp.ColorSpaces.Conversion
{
using ImageSharp.ColorSpaces;
using ImageSharp.ColorSpaces.Conversion.Implementation.CieLab;
using ImageSharp.ColorSpaces.Conversion.Implementation.CieLuv;
using ImageSharp.ColorSpaces.Conversion.Implementation.HunterLab;
using ImageSharp.ColorSpaces.Conversion.Implementation.Rgb;
using SixLabors.ImageSharp.ColorSpaces;
using SixLabors.ImageSharp.ColorSpaces.Conversion.Implementation.CieLabColorSapce;
using SixLabors.ImageSharp.ColorSpaces.Conversion.Implementation.CieLuvColorSapce;
using SixLabors.ImageSharp.ColorSpaces.Conversion.Implementation.HunterLabColorSapce;
using SixLabors.ImageSharp.ColorSpaces.Conversion.Implementation.RgbColorSapce;
namespace SixLabors.ImageSharp.ColorSpaces.Conversion
{
/// <content>
/// Allows conversion to <see cref="CieXyz"/>.
/// </content>

12
src/ImageSharp/ColorSpaces/Conversion/ColorSpaceConverter.Cmyk.cs

@ -1,13 +1,11 @@
// <copyright file="ColorSpaceConverter.cs" company="James Jackson-South">
// Copyright (c) James Jackson-South and contributors.
// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
// </copyright>
namespace ImageSharp.ColorSpaces.Conversion
{
using ImageSharp.ColorSpaces;
using ImageSharp.ColorSpaces.Conversion.Implementation.Cmyk;
using SixLabors.ImageSharp.ColorSpaces;
using SixLabors.ImageSharp.ColorSpaces.Conversion.Implementation.CmykColorSapce;
namespace SixLabors.ImageSharp.ColorSpaces.Conversion
{
/// <content>
/// Allows conversion to <see cref="Cmyk"/>.
/// </content>

12
src/ImageSharp/ColorSpaces/Conversion/ColorSpaceConverter.Hsl.cs

@ -1,13 +1,11 @@
// <copyright file="ColorSpaceConverter.cs" company="James Jackson-South">
// Copyright (c) James Jackson-South and contributors.
// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
// </copyright>
namespace ImageSharp.ColorSpaces.Conversion
{
using ImageSharp.ColorSpaces;
using ImageSharp.ColorSpaces.Conversion.Implementation.Hsl;
using SixLabors.ImageSharp.ColorSpaces;
using SixLabors.ImageSharp.ColorSpaces.Conversion.Implementation.HslColorSapce;
namespace SixLabors.ImageSharp.ColorSpaces.Conversion
{
/// <content>
/// Allows conversion to <see cref="Hsl"/>.
/// </content>

12
src/ImageSharp/ColorSpaces/Conversion/ColorSpaceConverter.Hsv.cs

@ -1,13 +1,11 @@
// <copyright file="ColorSpaceConverter.cs" company="James Jackson-South">
// Copyright (c) James Jackson-South and contributors.
// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
// </copyright>
namespace ImageSharp.ColorSpaces.Conversion
{
using ImageSharp.ColorSpaces;
using ImageSharp.ColorSpaces.Conversion.Implementation.Hsv;
using SixLabors.ImageSharp.ColorSpaces;
using SixLabors.ImageSharp.ColorSpaces.Conversion.Implementation.HsvColorSapce;
namespace SixLabors.ImageSharp.ColorSpaces.Conversion
{
/// <content>
/// Allows conversion to <see cref="Hsv"/>.
/// </content>

10
src/ImageSharp/ColorSpaces/Conversion/ColorSpaceConverter.HunterLab.cs

@ -1,12 +1,10 @@
// <copyright file="ColorSpaceConverter.cs" company="James Jackson-South">
// Copyright (c) James Jackson-South and contributors.
// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
// </copyright>
namespace ImageSharp.ColorSpaces.Conversion
{
using ImageSharp.ColorSpaces.Conversion.Implementation.HunterLab;
using SixLabors.ImageSharp.ColorSpaces.Conversion.Implementation.HunterLabColorSapce;
namespace SixLabors.ImageSharp.ColorSpaces.Conversion
{
/// <content>
/// Allows conversion to <see cref="HunterLab"/>.
/// </content>

10
src/ImageSharp/ColorSpaces/Conversion/ColorSpaceConverter.LinearRgb.cs

@ -1,12 +1,10 @@
// <copyright file="ColorSpaceConverter.cs" company="James Jackson-South">
// Copyright (c) James Jackson-South and contributors.
// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
// </copyright>
namespace ImageSharp.ColorSpaces.Conversion
{
using ImageSharp.ColorSpaces.Conversion.Implementation.Rgb;
using SixLabors.ImageSharp.ColorSpaces.Conversion.Implementation.RgbColorSapce;
namespace SixLabors.ImageSharp.ColorSpaces.Conversion
{
/// <content>
/// Allows conversion to <see cref="LinearRgb"/>.
/// </content>

10
src/ImageSharp/ColorSpaces/Conversion/ColorSpaceConverter.Lms.cs

@ -1,12 +1,10 @@
// <copyright file="ColorSpaceConverter.cs" company="James Jackson-South">
// Copyright (c) James Jackson-South and contributors.
// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
// </copyright>
namespace ImageSharp.ColorSpaces.Conversion
{
using ImageSharp.ColorSpaces;
using SixLabors.ImageSharp.ColorSpaces;
namespace SixLabors.ImageSharp.ColorSpaces.Conversion
{
/// <content>
/// Allows conversion to <see cref="Lms"/>.
/// </content>

10
src/ImageSharp/ColorSpaces/Conversion/ColorSpaceConverter.Rgb.cs

@ -1,12 +1,10 @@
// <copyright file="ColorSpaceConverter.cs" company="James Jackson-South">
// Copyright (c) James Jackson-South and contributors.
// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
// </copyright>
namespace ImageSharp.ColorSpaces.Conversion
{
using ImageSharp.ColorSpaces.Conversion.Implementation.Rgb;
using SixLabors.ImageSharp.ColorSpaces.Conversion.Implementation.RgbColorSapce;
namespace SixLabors.ImageSharp.ColorSpaces.Conversion
{
/// <content>
/// Allows conversion to <see cref="Rgb"/>.
/// </content>

12
src/ImageSharp/ColorSpaces/Conversion/ColorSpaceConverter.YCbCr.cs

@ -1,13 +1,11 @@
// <copyright file="ColorSpaceConverter.cs" company="James Jackson-South">
// Copyright (c) James Jackson-South and contributors.
// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
// </copyright>
namespace ImageSharp.ColorSpaces.Conversion
{
using ImageSharp.ColorSpaces;
using ImageSharp.ColorSpaces.Conversion.Implementation.YCbCr;
using SixLabors.ImageSharp.ColorSpaces;
using SixLabors.ImageSharp.ColorSpaces.Conversion.Implementation.YCbCrColorSapce;
namespace SixLabors.ImageSharp.ColorSpaces.Conversion
{
/// <content>
/// Allows conversion to <see cref="YCbCr"/>.
/// </content>

15
src/ImageSharp/ColorSpaces/Conversion/ColorSpaceConverter.cs

@ -1,15 +1,12 @@
// <copyright file="ColorSpaceConverter.cs" company="James Jackson-South">
// Copyright (c) James Jackson-South and contributors.
// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
// </copyright>
namespace ImageSharp.ColorSpaces.Conversion
{
using System.Numerics;
using ImageSharp.ColorSpaces;
using ImageSharp.ColorSpaces.Conversion.Implementation.Lms;
using System.Numerics;
using SixLabors.ImageSharp.ColorSpaces;
using SixLabors.ImageSharp.ColorSpaces.Conversion.Implementation.LmsColorSapce;
namespace SixLabors.ImageSharp.ColorSpaces.Conversion
{
/// <summary>
/// Converts between color spaces ensuring that the color is adapted using chromatic adaptation.
/// </summary>

10
src/ImageSharp/ColorSpaces/Conversion/IChromaticAdaptation.cs

@ -1,12 +1,10 @@
// <copyright file="IChromaticAdaptation.cs" company="James Jackson-South">
// Copyright (c) James Jackson-South and contributors.
// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
// </copyright>
namespace ImageSharp.ColorSpaces.Conversion
{
using ImageSharp.ColorSpaces;
using SixLabors.ImageSharp.ColorSpaces;
namespace SixLabors.ImageSharp.ColorSpaces.Conversion
{
/// <summary>
/// Chromatic adaptation.
/// A linear transformation of a source color (XS, YS, ZS) into a destination color (XD, YD, ZD) by a linear transformation [M]

6
src/ImageSharp/ColorSpaces/Conversion/IColorConversion.cs

@ -1,9 +1,7 @@
// <copyright file="IColorConversion.cs" company="James Jackson-South">
// Copyright (c) James Jackson-South and contributors.
// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
// </copyright>
namespace ImageSharp.ColorSpaces.Conversion
namespace SixLabors.ImageSharp.ColorSpaces.Conversion
{
/// <summary>
/// Converts color between two color spaces.

13
src/ImageSharp/ColorSpaces/Conversion/Implementation/CieLab/CieLabToCieXyzConverter.cs

@ -1,14 +1,11 @@
// <copyright file="CieLabToCieXyzConverter.cs" company="James Jackson-South">
// Copyright (c) James Jackson-South and contributors.
// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
// </copyright>
namespace ImageSharp.ColorSpaces.Conversion.Implementation.CieLab
{
using System.Runtime.CompilerServices;
using ImageSharp.ColorSpaces;
using System.Runtime.CompilerServices;
using SixLabors.ImageSharp.ColorSpaces;
namespace SixLabors.ImageSharp.ColorSpaces.Conversion.Implementation.CieLabColorSapce
{
/// <summary>
/// Converts from <see cref="CieLab"/> to <see cref="CieXyz"/>.
/// </summary>

13
src/ImageSharp/ColorSpaces/Conversion/Implementation/CieLab/CieXyzToCieLabConverter.cs

@ -1,14 +1,11 @@
// <copyright file="CieXyzToCieLabConverter.cs" company="James Jackson-South">
// Copyright (c) James Jackson-South and contributors.
// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
// </copyright>
namespace ImageSharp.ColorSpaces.Conversion.Implementation.CieLab
{
using System.Runtime.CompilerServices;
using ImageSharp.ColorSpaces;
using System.Runtime.CompilerServices;
using SixLabors.ImageSharp.ColorSpaces;
namespace SixLabors.ImageSharp.ColorSpaces.Conversion.Implementation.CieLabColorSapce
{
/// <summary>
/// Converts from <see cref="CieXyz"/> to <see cref="CieLab"/>.
/// </summary>

13
src/ImageSharp/ColorSpaces/Conversion/Implementation/CieLch/CIeLchToCieLabConverter.cs

@ -1,14 +1,11 @@
// <copyright file="CieLchToCieLabConverter.cs" company="James Jackson-South">
// Copyright (c) James Jackson-South and contributors.
// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
// </copyright>
namespace ImageSharp.ColorSpaces.Conversion.Implementation.CieLch
{
using System.Runtime.CompilerServices;
using ImageSharp.ColorSpaces;
using System.Runtime.CompilerServices;
using SixLabors.ImageSharp.ColorSpaces;
namespace SixLabors.ImageSharp.ColorSpaces.Conversion.Implementation.CieLchColorSapce
{
/// <summary>
/// Converts from <see cref="CieLch"/> to <see cref="CieLab"/>.
/// </summary>

13
src/ImageSharp/ColorSpaces/Conversion/Implementation/CieLch/CieLabToCieLchConverter.cs

@ -1,14 +1,11 @@
// <copyright file="CieLabToCieLchConverter.cs" company="James Jackson-South">
// Copyright (c) James Jackson-South and contributors.
// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
// </copyright>
namespace ImageSharp.ColorSpaces.Conversion.Implementation.CieLch
{
using System.Runtime.CompilerServices;
using ImageSharp.ColorSpaces;
using System.Runtime.CompilerServices;
using SixLabors.ImageSharp.ColorSpaces;
namespace SixLabors.ImageSharp.ColorSpaces.Conversion.Implementation.CieLchColorSapce
{
/// <summary>
/// Converts from <see cref="CieLab"/> to <see cref="CieLch"/>.
/// </summary>

13
src/ImageSharp/ColorSpaces/Conversion/Implementation/CieLchuv/CieLchuvToCieLuvConverter.cs

@ -1,14 +1,11 @@
// <copyright file="CieLchuvToCieLuvConverter.cs" company="James Jackson-South">
// Copyright (c) James Jackson-South and contributors.
// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
// </copyright>
namespace ImageSharp.ColorSpaces.Conversion.Implementation.CieLchuv
{
using System.Runtime.CompilerServices;
using ImageSharp.ColorSpaces;
using System.Runtime.CompilerServices;
using SixLabors.ImageSharp.ColorSpaces;
namespace SixLabors.ImageSharp.ColorSpaces.Conversion.Implementation.CieLchuvColorSapce
{
/// <summary>
/// Converts from <see cref="CieLch"/> to <see cref="CieLab"/>.
/// </summary>

13
src/ImageSharp/ColorSpaces/Conversion/Implementation/CieLchuv/CieLuvToCieLchuvConverter.cs

@ -1,14 +1,11 @@
// <copyright file="CieLuvToCieLchuvConverter.cs" company="James Jackson-South">
// Copyright (c) James Jackson-South and contributors.
// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
// </copyright>
namespace ImageSharp.ColorSpaces.Conversion.Implementation.CieLchuv
{
using System.Runtime.CompilerServices;
using ImageSharp.ColorSpaces;
using System.Runtime.CompilerServices;
using SixLabors.ImageSharp.ColorSpaces;
namespace SixLabors.ImageSharp.ColorSpaces.Conversion.Implementation.CieLchuvColorSapce
{
/// <summary>
/// Converts from <see cref="CieLab"/> to <see cref="CieLch"/>.
/// </summary>

12
src/ImageSharp/ColorSpaces/Conversion/Implementation/CieLuv/CieLuvToCieXyzConverter.cs

@ -1,13 +1,11 @@
// <copyright file="CieLuvToCieXyzConverter.cs" company="James Jackson-South">
// Copyright (c) James Jackson-South and contributors.
// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
// </copyright>
namespace ImageSharp.ColorSpaces.Conversion.Implementation.CieLuv
{
using System.Runtime.CompilerServices;
using ImageSharp.ColorSpaces;
using System.Runtime.CompilerServices;
using SixLabors.ImageSharp.ColorSpaces;
namespace SixLabors.ImageSharp.ColorSpaces.Conversion.Implementation.CieLuvColorSapce
{
/// <summary>
/// Converts from <see cref="CieLuv"/> to <see cref="CieXyz"/>.
/// </summary>

13
src/ImageSharp/ColorSpaces/Conversion/Implementation/CieLuv/CieXyzToCieLuvConverter.cs

@ -1,14 +1,11 @@
// <copyright file="CieXyzToCieLuvConverter.cs" company="James Jackson-South">
// Copyright (c) James Jackson-South and contributors.
// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
// </copyright>
namespace ImageSharp.ColorSpaces.Conversion.Implementation.CieLuv
{
using System.Runtime.CompilerServices;
using ImageSharp.ColorSpaces;
using System.Runtime.CompilerServices;
using SixLabors.ImageSharp.ColorSpaces;
namespace SixLabors.ImageSharp.ColorSpaces.Conversion.Implementation.CieLuvColorSapce
{
/// <summary>
/// Converts from <see cref="CieXyz"/> to <see cref="CieLuv"/>.
/// </summary>

13
src/ImageSharp/ColorSpaces/Conversion/Implementation/CieXyy/CieXyzAndCieXyyConverter.cs

@ -1,14 +1,11 @@
// <copyright file="CieXyzAndCieXyyConverter.cs" company="James Jackson-South">
// Copyright (c) James Jackson-South and contributors.
// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
// </copyright>
namespace ImageSharp.ColorSpaces.Conversion.Implementation.CieXyy
{
using System.Runtime.CompilerServices;
using ImageSharp.ColorSpaces;
using System.Runtime.CompilerServices;
using SixLabors.ImageSharp.ColorSpaces;
namespace SixLabors.ImageSharp.ColorSpaces.Conversion.Implementation.CieXyyColorSapce
{
/// <summary>
/// Color converter between CIE XYZ and CIE xyY
/// <see href="http://www.brucelindbloom.com/"/> for formulas.

15
src/ImageSharp/ColorSpaces/Conversion/Implementation/Cmyk/CmykAndRgbConverter.cs

@ -1,15 +1,12 @@
// <copyright file="CmykAndRgbConverter.cs" company="James Jackson-South">
// Copyright (c) James Jackson-South and contributors.
// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
// </copyright>
namespace ImageSharp.ColorSpaces.Conversion.Implementation.Cmyk
{
using System;
using System.Runtime.CompilerServices;
using ImageSharp.ColorSpaces;
using System;
using System.Runtime.CompilerServices;
using SixLabors.ImageSharp.ColorSpaces;
namespace SixLabors.ImageSharp.ColorSpaces.Conversion.Implementation.CmykColorSapce
{
/// <summary>
/// Color converter between CMYK and Rgb
/// </summary>

13
src/ImageSharp/ColorSpaces/Conversion/Implementation/Hsl/HslAndRgbConverter.cs

@ -1,14 +1,11 @@
// <copyright file="HslAndRgbConverter.cs" company="James Jackson-South">
// Copyright (c) James Jackson-South and contributors.
// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
// </copyright>
namespace ImageSharp.ColorSpaces.Conversion.Implementation.Hsl
{
using System.Runtime.CompilerServices;
using ImageSharp.ColorSpaces;
using System.Runtime.CompilerServices;
using SixLabors.ImageSharp.ColorSpaces;
namespace SixLabors.ImageSharp.ColorSpaces.Conversion.Implementation.HslColorSapce
{
/// <summary>
/// Color converter between HSL and Rgb
/// See <see href="http://www.poynton.com/PDFs/coloureq.pdf"/> for formulas.

15
src/ImageSharp/ColorSpaces/Conversion/Implementation/Hsv/HsvAndRgbConverter.cs

@ -1,15 +1,12 @@
// <copyright file="HsvAndRgbConverter.cs" company="James Jackson-South">
// Copyright (c) James Jackson-South and contributors.
// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
// </copyright>
namespace ImageSharp.ColorSpaces.Conversion.Implementation.Hsv
{
using System;
using System.Runtime.CompilerServices;
using ImageSharp.ColorSpaces;
using System;
using System.Runtime.CompilerServices;
using SixLabors.ImageSharp.ColorSpaces;
namespace SixLabors.ImageSharp.ColorSpaces.Conversion.Implementation.HsvColorSapce
{
/// <summary>
/// Color converter between HSV and Rgb
/// See <see href="http://www.poynton.com/PDFs/coloureq.pdf"/> for formulas.

10
src/ImageSharp/ColorSpaces/Conversion/Implementation/HunterLab/CieXyzAndHunterLabConverterBase.cs

@ -1,12 +1,10 @@
// <copyright file="CieXyzAndHunterLabConverterBase.cs" company="James Jackson-South">
// Copyright (c) James Jackson-South and contributors.
// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
// </copyright>
namespace ImageSharp.ColorSpaces.Conversion.Implementation.HunterLab
{
using System.Runtime.CompilerServices;
using System.Runtime.CompilerServices;
namespace SixLabors.ImageSharp.ColorSpaces.Conversion.Implementation.HunterLabColorSapce
{
/// <summary>
/// The base class for converting between <see cref="HunterLab"/> and <see cref="CieXyz"/> color spaces.
/// </summary>

13
src/ImageSharp/ColorSpaces/Conversion/Implementation/HunterLab/CieXyzToHunterLabConverter.cs

@ -1,14 +1,11 @@
// <copyright file="CieXyzToHunterLabConverter.cs" company="James Jackson-South">
// Copyright (c) James Jackson-South and contributors.
// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
// </copyright>
namespace ImageSharp.ColorSpaces.Conversion.Implementation.HunterLab
{
using System.Runtime.CompilerServices;
using ImageSharp.ColorSpaces;
using System.Runtime.CompilerServices;
using SixLabors.ImageSharp.ColorSpaces;
namespace SixLabors.ImageSharp.ColorSpaces.Conversion.Implementation.HunterLabColorSapce
{
/// <summary>
/// Color converter between CieXyz and HunterLab
/// </summary>

13
src/ImageSharp/ColorSpaces/Conversion/Implementation/HunterLab/HunterLabToCieXyzConverter.cs

@ -1,14 +1,11 @@
// <copyright file="HunterLabToCieXyzConverter.cs" company="James Jackson-South">
// Copyright (c) James Jackson-South and contributors.
// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
// </copyright>
namespace ImageSharp.ColorSpaces.Conversion.Implementation.HunterLab
{
using System.Runtime.CompilerServices;
using ImageSharp.ColorSpaces;
using System.Runtime.CompilerServices;
using SixLabors.ImageSharp.ColorSpaces;
namespace SixLabors.ImageSharp.ColorSpaces.Conversion.Implementation.HunterLabColorSapce
{
/// <summary>
/// Color converter between HunterLab and CieXyz
/// </summary>

15
src/ImageSharp/ColorSpaces/Conversion/Implementation/Lms/CieXyzAndLmsConverter.cs

@ -1,15 +1,12 @@
// <copyright file="CieXyzAndLmsConverter.cs" company="James Jackson-South">
// Copyright (c) James Jackson-South and contributors.
// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
// </copyright>
namespace ImageSharp.ColorSpaces.Conversion.Implementation.Lms
{
using System.Numerics;
using System.Runtime.CompilerServices;
using ImageSharp.ColorSpaces;
using System.Numerics;
using System.Runtime.CompilerServices;
using SixLabors.ImageSharp.ColorSpaces;
namespace SixLabors.ImageSharp.ColorSpaces.Conversion.Implementation.LmsColorSapce
{
/// <summary>
/// Color converter between CIE XYZ and LMS
/// </summary>

10
src/ImageSharp/ColorSpaces/Conversion/Implementation/Lms/LmsAdaptationMatrix.cs

@ -1,13 +1,11 @@
// <copyright file="LmsAdaptationMatrix.cs" company="James Jackson-South">
// Copyright (c) James Jackson-South and contributors.
// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
// </copyright>
using System.Numerics;
// ReSharper disable InconsistentNaming
namespace ImageSharp.ColorSpaces.Conversion.Implementation.Lms
namespace SixLabors.ImageSharp.ColorSpaces.Conversion.Implementation.LmsColorSapce
{
using System.Numerics;
/// <summary>
/// AdaptionMatrix3X3 used for transformation from XYZ to LMS, defining the cone response domain.
/// Used in <see cref="IChromaticAdaptation"/>

12
src/ImageSharp/ColorSpaces/Conversion/Implementation/Rgb/CieXyzToLinearRgbConverter.cs

@ -1,14 +1,10 @@
// <copyright file="LinearRgbToRgbConverter.cs" company="James Jackson-South">
// Copyright (c) James Jackson-South and contributors.
// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
// </copyright>
namespace ImageSharp.ColorSpaces.Conversion.Implementation.Rgb
{
using System.Numerics;
using Rgb = ImageSharp.ColorSpaces.Rgb;
using System.Numerics;
namespace SixLabors.ImageSharp.ColorSpaces.Conversion.Implementation.RgbColorSapce
{
/// <summary>
/// Color converter between CieXyz and LinearRgb
/// </summary>

12
src/ImageSharp/ColorSpaces/Conversion/Implementation/Rgb/GammaCompanding.cs

@ -1,13 +1,11 @@
// <copyright file="GammaCompanding.cs" company="James Jackson-South">
// Copyright (c) James Jackson-South and contributors.
// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
// </copyright>
namespace ImageSharp.ColorSpaces.Conversion.Implementation.Rgb
{
using System;
using System.Runtime.CompilerServices;
using System;
using System.Runtime.CompilerServices;
namespace SixLabors.ImageSharp.ColorSpaces.Conversion.Implementation.RgbColorSapce
{
/// <summary>
/// Implements gamma companding
/// </summary>

10
src/ImageSharp/ColorSpaces/Conversion/Implementation/Rgb/LCompanding.cs

@ -1,12 +1,10 @@
// <copyright file="LCompanding.cs" company="James Jackson-South">
// Copyright (c) James Jackson-South and contributors.
// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
// </copyright>
namespace ImageSharp.ColorSpaces.Conversion.Implementation.Rgb
{
using System.Runtime.CompilerServices;
using System.Runtime.CompilerServices;
namespace SixLabors.ImageSharp.ColorSpaces.Conversion.Implementation.RgbColorSapce
{
/// <summary>
/// Implements L* companding
/// </summary>

10
src/ImageSharp/ColorSpaces/Conversion/Implementation/Rgb/LinearRgbAndCieXyzConverterBase.cs

@ -1,12 +1,10 @@
// <copyright file="LinearRgbAndCieXyzConverterBase.cs" company="James Jackson-South">
// Copyright (c) James Jackson-South and contributors.
// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
// </copyright>
namespace ImageSharp.ColorSpaces.Conversion.Implementation.Rgb
{
using System.Numerics;
using System.Numerics;
namespace SixLabors.ImageSharp.ColorSpaces.Conversion.Implementation.RgbColorSapce
{
/// <summary>
/// Provides base methods for converting between Rgb and CieXyz color spaces.
/// </summary>

12
src/ImageSharp/ColorSpaces/Conversion/Implementation/Rgb/LinearRgbToCieXyzConverter.cs

@ -1,14 +1,10 @@
// <copyright file="LinearRgbToCieXyzConverter.cs" company="James Jackson-South">
// Copyright (c) James Jackson-South and contributors.
// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
// </copyright>
namespace ImageSharp.ColorSpaces.Conversion.Implementation.Rgb
{
using System.Numerics;
using Rgb = ImageSharp.ColorSpaces.Rgb;
using System.Numerics;
namespace SixLabors.ImageSharp.ColorSpaces.Conversion.Implementation.RgbColorSapce
{
/// <summary>
/// Color converter between LinearRgb and CieXyz
/// </summary>

12
src/ImageSharp/ColorSpaces/Conversion/Implementation/Rgb/LinearRgbToRgbConverter.cs

@ -1,14 +1,10 @@
// <copyright file="LinearRgbToRgbConverter.cs" company="James Jackson-South">
// Copyright (c) James Jackson-South and contributors.
// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
// </copyright>
namespace ImageSharp.ColorSpaces.Conversion.Implementation.Rgb
{
using System.Numerics;
using Rgb = ColorSpaces.Rgb;
using System.Numerics;
namespace SixLabors.ImageSharp.ColorSpaces.Conversion.Implementation.RgbColorSapce
{
/// <summary>
/// Color converter between LinearRgb and Rgb
/// </summary>

Some files were not shown because too many files changed in this diff

Loading…
Cancel
Save