Browse Source

Update all ColorMatrixFilters

Former-commit-id: 81f83cc9f0f167fb3bde367bbd36fe9aa76504b0
Former-commit-id: 44d4145471664034876eb2afa05431a792ea0b78
Former-commit-id: 11968713a68322487ff287d8c30e039f0b83e302
af/merge-core
James Jackson-South 10 years ago
parent
commit
23e1c8f018
  1. 29
      src/ImageProcessor/Filters/ColorMatrix/BlackWhite.cs
  2. 273
      src/ImageProcessor/Filters/ColorMatrix/ColorMatrix.cs
  3. 38
      src/ImageProcessor/Filters/ColorMatrix/ColorMatrixFilter.cs
  4. 2
      src/ImageProcessor/Filters/ColorMatrix/GreyscaleBt601.cs
  5. 2
      src/ImageProcessor/Filters/ColorMatrix/GreyscaleBt709.cs
  6. 36
      src/ImageProcessor/Filters/ColorMatrix/Kodachrome.cs
  7. 14
      src/ImageProcessor/Filters/ColorMatrix/Lomograph.cs
  8. 77
      src/ImageProcessor/Filters/ColorMatrix/MatrixFilter.cs
  9. 28
      src/ImageProcessor/Filters/ColorMatrix/Polaroid.cs
  10. 2
      src/ImageProcessor/Filters/ColorMatrix/Sepia.cs
  11. 5
      src/ImageProcessor/ImageProcessor.csproj
  12. 2
      src/ImageProcessor/project.lock.json.REMOVED.git-id
  13. 3
      tests/ImageProcessor.Tests/Processors/Filters/FilterTests.cs
  14. 2
      tests/ImageProcessor.Tests/Processors/ProcessorTestBase.cs
  15. 3
      tests/ImageProcessor.Tests/TestImages/Formats/Jpg/lomo.jpg
  16. 1
      tests/ImageProcessor.Tests/TestImages/Formats/Jpg/shaftesbury.jpg.REMOVED.git-id

29
src/ImageProcessor/Filters/ColorMatrix/BlackWhite.cs

@ -5,6 +5,8 @@
namespace ImageProcessor.Filters
{
using System.Numerics;
/// <summary>
/// Converts the colors of the image to their black and white equivalent.
/// </summary>
@ -12,23 +14,28 @@ namespace ImageProcessor.Filters
{
/// <summary>
/// The BlackWhite matrix.
/// TODO: Calculate a matrix that works in the linear color space.
/// </summary>
private static readonly ColorMatrix Matrix = new ColorMatrix(
new[]
{
new[] { 1.5f, 1.5f, 1.5f, 0, 0 },
new[] { 1.5f, 1.5f, 1.5f, 0, 0 },
new[] { 1.5f, 1.5f, 1.5f, 0, 0 },
new float[] { 0, 0, 0, 1, 0 },
new float[] { -1, -1, -1, 0, 1 }
});
private static readonly Matrix4x4 Matrix = new Matrix4x4()
{
M11 = 1.5f,
M12 = 1.5f,
M13 = 1.5f,
M21 = 1.5f,
M22 = 1.5f,
M23 = 1.5f,
M31 = 1.5f,
M32 = 1.5f,
M33 = 1.5f,
M41 = -1f,
M42 = -1f,
M43 = -1f,
};
/// <summary>
/// Initializes a new instance of the <see cref="BlackWhite"/> class.
/// </summary>
public BlackWhite()
: base(Matrix, false)
: base(Matrix)
{
}
}

273
src/ImageProcessor/Filters/ColorMatrix/ColorMatrix.cs

@ -1,273 +0,0 @@
// --------------------------------------------------------------------------------------------------------------------
// <copyright file="ColorMatrix.cs" company="James South">
// Copyright (c) James South and contributors.
// Licensed under the Apache License, Version 2.0.
// </copyright>
// --------------------------------------------------------------------------------------------------------------------
namespace ImageProcessor.Filters
{
/// <summary>
/// Defines a 5x5 matrix that contains the coordinates for the RGBAW color space.
/// </summary>
public sealed class ColorMatrix
{
/// <summary>
/// Initializes a new instance of the <see cref="ColorMatrix"/> class.
/// </summary>
public ColorMatrix()
{
// Setup the identity matrix by default
this.Matrix00 = 1.0f;
this.Matrix11 = 1.0f;
this.Matrix22 = 1.0f;
this.Matrix33 = 1.0f;
this.Matrix44 = 1.0f;
}
/// <summary>
/// Initializes a new instance of the <see cref="ColorMatrix"/> class with the
/// elements in the specified matrix.
/// </summary>
/// <param name="colorMatrix">
/// The elements defining the new Color Matrix.
/// </param>
public ColorMatrix(float[][] colorMatrix)
{
this.SetMatrix(colorMatrix);
}
/// <summary>
/// Gets or sets the element at the 0th row and 0th column of this <see cref="ColorMatrix"/>.
/// </summary>
public float Matrix00 { get; set; }
/// <summary>
/// Gets or sets the element at the 0th row and 1st column of this <see cref="ColorMatrix"/>.
/// </summary>
public float Matrix01 { get; set; }
/// <summary>
/// Gets or sets the element at the 0th row and 2nd column of this <see cref="ColorMatrix"/>.
/// </summary>
public float Matrix02 { get; set; }
/// <summary>
/// Gets or sets the element at the 0th row and 3rd column of this <see cref="ColorMatrix"/>.
/// </summary>
public float Matrix03 { get; set; }
/// <summary>
/// Gets or sets the element at the 0th row and 4th column of this <see cref="ColorMatrix"/>.
/// </summary>
public float Matrix04 { get; set; }
/// <summary>
/// Gets or sets the element at the 1st row and 0th column of this <see cref="ColorMatrix"/>.
/// </summary>
public float Matrix10 { get; set; }
/// <summary>
/// Gets or sets the element at the 1st row and 1st column of this <see cref="ColorMatrix"/>.
/// </summary>
public float Matrix11 { get; set; }
/// <summary>
/// Gets or sets the element at the 1st row and 2nd column of this <see cref="ColorMatrix"/>.
/// </summary>
public float Matrix12 { get; set; }
/// <summary>
/// Gets or sets the element at the 1st row and 3rd column of this <see cref="ColorMatrix"/>.
/// </summary>
public float Matrix13 { get; set; }
/// <summary>
/// Gets or sets the element at the 1st row and 4th column of this <see cref="ColorMatrix"/>.
/// </summary>
public float Matrix14 { get; set; }
/// <summary>
/// Gets or sets the element at the 2nd row and 0th column of this <see cref="ColorMatrix"/>.
/// </summary>
public float Matrix20 { get; set; }
/// <summary>
/// Gets or sets the element at the 2nd row and 1st column of this <see cref="ColorMatrix"/>.
/// </summary>
public float Matrix21 { get; set; }
/// <summary>
/// Gets or sets the element at the 2nd row and 2nd column of this <see cref="ColorMatrix"/>.
/// </summary>
public float Matrix22 { get; set; }
/// <summary>
/// Gets or sets the element at the 2nd row and 3rd column of this <see cref="ColorMatrix"/>.
/// </summary>
public float Matrix23 { get; set; }
/// <summary>
/// Gets or sets the element at the 2nd row and 4th column of this <see cref="ColorMatrix"/>.
/// </summary>
public float Matrix24 { get; set; }
/// <summary>
/// Gets or sets the element at the 3rd row and 0th column of this <see cref="ColorMatrix"/>.
/// </summary>
public float Matrix30 { get; set; }
/// <summary>
/// Gets or sets the element at the 3rd row and 1st column of this <see cref="ColorMatrix"/>.
/// </summary>
public float Matrix31 { get; set; }
/// <summary>
/// Gets or sets the element at the 3rd row and 2nd column of this <see cref="ColorMatrix"/>.
/// </summary>
public float Matrix32 { get; set; }
/// <summary>
/// Gets or sets the element at the 3rd row and 3rd column of this <see cref="ColorMatrix"/>.
/// </summary>
public float Matrix33 { get; set; }
/// <summary>
/// Gets or sets the element at the 3rd row and 4th column of this <see cref="ColorMatrix"/>.
/// </summary>
public float Matrix34 { get; set; }
/// <summary>
/// Gets or sets the element at the 4th row and 0th column of this <see cref="ColorMatrix"/>.
/// </summary>
public float Matrix40 { get; set; }
/// <summary>
/// Gets or sets the element at the 4th row and 1st column of this <see cref="ColorMatrix"/>.
/// </summary>
public float Matrix41 { get; set; }
/// <summary>
/// Gets or sets the element at the 4th row and 2nd column of this <see cref="ColorMatrix"/>.
/// </summary>
public float Matrix42 { get; set; }
/// <summary>
/// Gets or sets the element at the 4th row and 3rd column of this <see cref="ColorMatrix"/>.
/// </summary>
public float Matrix43 { get; set; }
/// <summary>
/// Gets or sets the element at the 4th row and 4th column of this <see cref="ColorMatrix"/>.
/// </summary>
public float Matrix44 { get; set; }
/// <summary>
/// Gets or sets the value of the specified element of this <see cref="ColorMatrix"/>.
/// </summary>
/// <param name="row">
/// The row index.
/// </param>
/// <param name="column">
/// The column index.
/// </param>
/// <returns>
/// The <see cref="float"/>.
/// </returns>
public float this[int row, int column]
{
get
{
return this.GetMatrix()[row][column];
}
set
{
float[][] tempMatrix = this.GetMatrix();
tempMatrix[row][column] = value;
this.SetMatrix(tempMatrix);
}
}
/// <summary>
/// Sets the values of this <see cref="ColorMatrix"/> to the values contained within the elements.
/// </summary>
/// <param name="colorMatrix">
/// The new color matrix.
/// </param>
internal void SetMatrix(float[][] colorMatrix)
{
this.Matrix00 = colorMatrix[0][0];
this.Matrix01 = colorMatrix[0][1];
this.Matrix02 = colorMatrix[0][2];
this.Matrix03 = colorMatrix[0][3];
this.Matrix04 = colorMatrix[0][4];
this.Matrix10 = colorMatrix[1][0];
this.Matrix11 = colorMatrix[1][1];
this.Matrix12 = colorMatrix[1][2];
this.Matrix13 = colorMatrix[1][3];
this.Matrix14 = colorMatrix[1][4];
this.Matrix20 = colorMatrix[2][0];
this.Matrix21 = colorMatrix[2][1];
this.Matrix22 = colorMatrix[2][2];
this.Matrix23 = colorMatrix[2][3];
this.Matrix24 = colorMatrix[2][4];
this.Matrix30 = colorMatrix[3][0];
this.Matrix31 = colorMatrix[3][1];
this.Matrix32 = colorMatrix[3][2];
this.Matrix33 = colorMatrix[3][3];
this.Matrix34 = colorMatrix[3][4];
this.Matrix40 = colorMatrix[4][0];
this.Matrix41 = colorMatrix[4][1];
this.Matrix42 = colorMatrix[4][2];
this.Matrix43 = colorMatrix[4][3];
this.Matrix44 = colorMatrix[4][4];
}
/// <summary>
/// Gets this <see cref="ColorMatrix"/>.
/// </summary>
/// <returns>
/// The <see cref="T:float[][]"/>.
/// </returns>
internal float[][] GetMatrix()
{
float[][] returnMatrix = new float[5][];
for (int i = 0; i < 5; i++)
{
returnMatrix[i] = new float[5];
}
returnMatrix[0][0] = this.Matrix00;
returnMatrix[0][1] = this.Matrix01;
returnMatrix[0][2] = this.Matrix02;
returnMatrix[0][3] = this.Matrix03;
returnMatrix[0][4] = this.Matrix04;
returnMatrix[1][0] = this.Matrix10;
returnMatrix[1][1] = this.Matrix11;
returnMatrix[1][2] = this.Matrix12;
returnMatrix[1][3] = this.Matrix13;
returnMatrix[1][4] = this.Matrix14;
returnMatrix[2][0] = this.Matrix20;
returnMatrix[2][1] = this.Matrix21;
returnMatrix[2][2] = this.Matrix22;
returnMatrix[2][3] = this.Matrix23;
returnMatrix[2][4] = this.Matrix24;
returnMatrix[3][0] = this.Matrix30;
returnMatrix[3][1] = this.Matrix31;
returnMatrix[3][2] = this.Matrix32;
returnMatrix[3][3] = this.Matrix33;
returnMatrix[3][4] = this.Matrix34;
returnMatrix[4][0] = this.Matrix40;
returnMatrix[4][1] = this.Matrix41;
returnMatrix[4][2] = this.Matrix42;
returnMatrix[4][3] = this.Matrix43;
returnMatrix[4][4] = this.Matrix44;
return returnMatrix;
}
}
}

38
src/ImageProcessor/Filters/ColorMatrix/ColorMatrixFilter.cs

@ -5,6 +5,7 @@
namespace ImageProcessor.Filters
{
using System.Numerics;
using System.Threading.Tasks;
/// <summary>
@ -15,33 +16,25 @@ namespace ImageProcessor.Filters
/// <summary>
/// Initializes a new instance of the <see cref="ColorMatrixFilter"/> class.
/// </summary>
/// <param name="matrix">The matrix to apply.</param>
/// <param name="gammaAdjust">Whether to gamma adjust the colors before applying the matrix.</param>
public ColorMatrixFilter(ColorMatrix matrix, bool gammaAdjust)
/// <param name="matrix">The <see cref="Matrix4x4"/> to apply.</param>
public ColorMatrixFilter(Matrix4x4 matrix)
{
this.Value = matrix;
this.GammaAdjust = gammaAdjust;
}
/// <summary>
/// Gets the matrix value.
/// </summary>
public ColorMatrix Value { get; }
/// <summary>
/// Gets a value indicating whether to gamma adjust the colors before applying the matrix.
/// </summary>
public bool GammaAdjust { get; }
public Matrix4x4 Value { get; }
/// <inheritdoc/>
protected override void Apply(ImageBase target, ImageBase source, Rectangle targetRectangle, Rectangle sourceRectangle, int startY, int endY)
{
bool gamma = this.GammaAdjust;
int sourceY = sourceRectangle.Y;
int sourceBottom = sourceRectangle.Bottom;
int startX = sourceRectangle.X;
int endX = sourceRectangle.Right;
ColorMatrix matrix = this.Value;
Matrix4x4 matrix = this.Value;
Parallel.For(
startY,
@ -52,7 +45,7 @@ namespace ImageProcessor.Filters
{
for (int x = startX; x < endX; x++)
{
target[x, y] = ApplyMatrix(source[x, y], matrix, gamma);
target[x, y] = ApplyMatrix(source[x, y], matrix);
}
}
});
@ -63,29 +56,22 @@ namespace ImageProcessor.Filters
/// </summary>
/// <param name="color">The source color.</param>
/// <param name="matrix">The matrix.</param>
/// <param name="gamma">Whether to perform gamma adjustments.</param>
/// <returns>
/// The <see cref="Color"/>.
/// </returns>
private static Color ApplyMatrix(Color color, ColorMatrix matrix, bool gamma)
private static Color ApplyMatrix(Color color, Matrix4x4 matrix)
{
if (gamma)
{
color = PixelOperations.ToLinear(color);
}
color = PixelOperations.ToLinear(color);
float sr = color.R;
float sg = color.G;
float sb = color.B;
float sa = color.A;
// TODO: Investigate RGBAW
color.R = (sr * matrix.Matrix00) + (sg * matrix.Matrix10) + (sb * matrix.Matrix20) + (sa * matrix.Matrix30) + matrix.Matrix40;
color.G = (sr * matrix.Matrix01) + (sg * matrix.Matrix11) + (sb * matrix.Matrix21) + (sa * matrix.Matrix31) + matrix.Matrix41;
color.B = (sr * matrix.Matrix02) + (sg * matrix.Matrix12) + (sb * matrix.Matrix22) + (sa * matrix.Matrix32) + matrix.Matrix42;
color.A = (sr * matrix.Matrix03) + (sg * matrix.Matrix13) + (sb * matrix.Matrix23) + (sa * matrix.Matrix33) + matrix.Matrix43;
color.R = (sr * matrix.M11) + (sg * matrix.M21) + (sb * matrix.M31) + matrix.M41;
color.G = (sr * matrix.M12) + (sg * matrix.M22) + (sb * matrix.M32) + matrix.M42;
color.B = (sr * matrix.M13) + (sg * matrix.M23) + (sb * matrix.M33) + matrix.M43;
return gamma ? PixelOperations.ToSrgb(color) : color;
return PixelOperations.ToSrgb(color);
}
}
}

2
src/ImageProcessor/Filters/ColorMatrix/GreyscaleBt601.cs

@ -11,7 +11,7 @@ namespace ImageProcessor.Filters
/// Converts the colors of the image to greyscale applying the formula as specified by
/// ITU-R Recommendation BT.601 <see href="https://en.wikipedia.org/wiki/Luma_%28video%29#Rec._601_luma_versus_Rec._709_luma_coefficients"/>.
/// </summary>
public class GreyscaleBt601 : MatrixFilter
public class GreyscaleBt601 : ColorMatrixFilter
{
/// <summary>
/// The greyscale matrix.

2
src/ImageProcessor/Filters/ColorMatrix/GreyscaleBt709.cs

@ -11,7 +11,7 @@ namespace ImageProcessor.Filters
/// Converts the colors of the image to greyscale applying the formula as specified by
/// ITU-R Recommendation BT.709 <see href="https://en.wikipedia.org/wiki/Rec._709#Luma_coefficients"/>.
/// </summary>
public class GreyscaleBt709 : MatrixFilter
public class GreyscaleBt709 : ColorMatrixFilter
{
/// <summary>
/// The greyscale matrix.

36
src/ImageProcessor/Filters/ColorMatrix/Kodachrome.cs

@ -0,0 +1,36 @@
// <copyright file="Kodachrome.cs" company="James South">
// Copyright (c) James South and contributors.
// Licensed under the Apache License, Version 2.0.
// </copyright>
namespace ImageProcessor.Filters
{
using System.Numerics;
/// <summary>
/// Converts the colors of the image recreating an old Kodachrome camera effect.
/// </summary>
public class Kodachrome : ColorMatrixFilter
{
/// <summary>
/// The Kodachrome matrix. Purely artistic in composition.
/// </summary>
private static readonly Matrix4x4 Matrix = new Matrix4x4()
{
M11 = 0.6997023f,
M22 = 0.4609577f,
M33 = 0.397218f,
M41 = 0.005f,
M42 = -0.005f,
M43 = 0.005f
};
/// <summary>
/// Initializes a new instance of the <see cref="Kodachrome"/> class.
/// </summary>
public Kodachrome()
: base(Matrix)
{
}
}
}

14
src/ImageProcessor/Filters/ColorMatrix/Lomograph.cs

@ -10,30 +10,20 @@ namespace ImageProcessor.Filters
/// <summary>
/// Converts the colors of the image recreating an old Lomograph effect.
/// </summary>
public class Lomograph : MatrixFilter
public class Lomograph : ColorMatrixFilter
{
/// <summary>
/// The Lomograph matrix. Purely artistic in composition.
/// TODO: Calculate a matrix that works in the linear color space.
/// </summary>
private static readonly Matrix4x4 Matrix = new Matrix4x4()
{
M11 = 1.5f,
M22 = 1.45f,
M33 = 1.09f,
M33 = 1.11f,
M41 = -.1f,
M42 = .0f,
M43 = -.08f
};
//private static readonly ColorMatrix Matrix = new ColorMatrix(
// new[]
// {
// new[] { 1.50f, 0, 0, 0, 0 },
// new[] { 0, 1.45f, 0, 0, 0 },
// new[] { 0, 0, 1.09f, 0, 0 },
// new float[] { 0, 0, 0, 1, 0 },
// new[] { -0.10f, 0.05f, -0.08f, 0, 1 }
// });
/// <summary>
/// Initializes a new instance of the <see cref="Lomograph"/> class.

77
src/ImageProcessor/Filters/ColorMatrix/MatrixFilter.cs

@ -1,77 +0,0 @@
// <copyright file="ColorMatrixFilter.cs" company="James South">
// Copyright (c) James South and contributors.
// Licensed under the Apache License, Version 2.0.
// </copyright>
namespace ImageProcessor.Filters
{
using System.Numerics;
using System.Threading.Tasks;
/// <summary>
/// The color matrix filter.
/// </summary>
public class MatrixFilter : ParallelImageProcessor
{
/// <summary>
/// Initializes a new instance of the <see cref="MatrixFilter"/> class.
/// </summary>
/// <param name="matrix">The <see cref="Matrix4x4"/> to apply.</param>
public MatrixFilter(Matrix4x4 matrix)
{
this.Value = matrix;
}
/// <summary>
/// Gets the matrix value.
/// </summary>
public Matrix4x4 Value { get; }
/// <inheritdoc/>
protected override void Apply(ImageBase target, ImageBase source, Rectangle targetRectangle, Rectangle sourceRectangle, int startY, int endY)
{
int sourceY = sourceRectangle.Y;
int sourceBottom = sourceRectangle.Bottom;
int startX = sourceRectangle.X;
int endX = sourceRectangle.Right;
Matrix4x4 matrix = this.Value;
Parallel.For(
startY,
endY,
y =>
{
if (y >= sourceY && y < sourceBottom)
{
for (int x = startX; x < endX; x++)
{
target[x, y] = ApplyMatrix(source[x, y], matrix);
}
}
});
}
/// <summary>
/// Applies the color matrix against the given color.
/// </summary>
/// <param name="color">The source color.</param>
/// <param name="matrix">The matrix.</param>
/// <returns>
/// The <see cref="Color"/>.
/// </returns>
private static Color ApplyMatrix(Color color, Matrix4x4 matrix)
{
color = PixelOperations.ToLinear(color);
float sr = color.R;
float sg = color.G;
float sb = color.B;
color.R = (sr * matrix.M11) + (sg * matrix.M21) + (sb * matrix.M31) + matrix.M41;
color.G = (sr * matrix.M12) + (sg * matrix.M22) + (sb * matrix.M32) + matrix.M42;
color.B = (sr * matrix.M13) + (sg * matrix.M23) + (sb * matrix.M33) + matrix.M43;
return PixelOperations.ToSrgb(color);
}
}
}

28
src/ImageProcessor/Filters/ColorMatrix/Polaroid.cs

@ -5,6 +5,8 @@
namespace ImageProcessor.Filters
{
using System.Numerics;
/// <summary>
/// Converts the colors of the image recreating an old Polaroid effect.
/// </summary>
@ -14,21 +16,27 @@ namespace ImageProcessor.Filters
/// The Polaroid matrix. Purely artistic in composition.
/// TODO: Calculate a matrix that works in the linear color space.
/// </summary>
private static readonly ColorMatrix Matrix = new ColorMatrix(
new[]
{
new[] { 1.638f, -0.062f, -0.262f, 0, 0 },
new[] { -0.122f, 1.378f, -0.122f, 0, 0 },
new[] { 1.016f, -0.016f, 1.383f, 0, 0 },
new float[] { 0, 0, 0, 1, 0 },
new[] { 0.06f, -0.05f, -0.05f, 0, 1 }
});
private static readonly Matrix4x4 Matrix = new Matrix4x4()
{
M11 = 1.538f,
M12 = -0.062f,
M13 = -0.262f,
M21 = -0.022f,
M22 = 1.578f,
M23 = -0.022f,
M31 = .616f,
M32 = -.16f,
M33 = 1.5831f,
M41 = 0.02f,
M42 = -0.05f,
M43 = -0.05f
};
/// <summary>
/// Initializes a new instance of the <see cref="Polaroid"/> class.
/// </summary>
public Polaroid()
: base(Matrix, false)
: base(Matrix)
{
}
}

2
src/ImageProcessor/Filters/ColorMatrix/Sepia.cs

@ -10,7 +10,7 @@ namespace ImageProcessor.Filters
/// <summary>
/// Converts the colors of the image to their sepia equivalent recreating an old photo effect.
/// </summary>
public class Sepia : MatrixFilter
public class Sepia : ColorMatrixFilter
{
/// <summary>
/// The sepia matrix.

5
src/ImageProcessor/ImageProcessor.csproj

@ -48,14 +48,13 @@
<Compile Include="Common\Extensions\EnumerableExtensions.cs" />
<Compile Include="Common\Helpers\ImageMaths.cs" />
<Compile Include="Common\Helpers\PixelOperations.cs" />
<Compile Include="Filters\ColorMatrix\MatrixFilter.cs" />
<Compile Include="Filters\ColorMatrix\ColorMatrixFilter.cs" />
<Compile Include="Filters\ColorMatrix\Kodachrome.cs" />
<Compile Include="Filters\Saturation.cs" />
<Compile Include="Filters\ColorMatrix\GreyscaleMode.cs" />
<Compile Include="Filters\Brightness.cs" />
<Compile Include="Filters\Invert.cs" />
<Compile Include="Filters\Alpha.cs" />
<Compile Include="Filters\ColorMatrix\ColorMatrix.cs" />
<Compile Include="Filters\ColorMatrix\ColorMatrixFilter.cs" />
<Compile Include="Filters\ColorMatrix\GreyscaleBt601.cs" />
<Compile Include="Filters\ColorMatrix\GreyscaleBt709.cs" />
<Compile Include="Filters\ColorMatrix\BlackWhite.cs" />

2
src/ImageProcessor/project.lock.json.REMOVED.git-id

@ -1 +1 @@
3f05708641eb3ed085d4689aae4a960eb067fd16
eb00c54ee74016c2b70f81963e7e8f83cb2dd54b

3
tests/ImageProcessor.Tests/Processors/Filters/FilterTests.cs

@ -22,8 +22,9 @@ namespace ImageProcessor.Tests
//{ "Invert", new Invert() },
//{ "Sepia", new Sepia() },
//{ "BlackWhite", new BlackWhite() },
{ "Lomograph", new Lomograph() },
//{ "Lomograph", new Lomograph() },
//{ "Polaroid", new Polaroid() },
{ "Brownie", new Kodachrome() },
//{ "GreyscaleBt709", new GreyscaleBt709() },
//{ "GreyscaleBt601", new GreyscaleBt601() },
};

2
tests/ImageProcessor.Tests/Processors/ProcessorTestBase.cs

@ -21,6 +21,8 @@ namespace ImageProcessor.Tests
{
//"../../TestImages/Formats/Jpg/Backdrop.jpg",
"../../TestImages/Formats/Jpg/Calliphora.jpg",
"../../TestImages/Formats/Jpg/lomo.jpg",
"../../TestImages/Formats/Jpg/shaftesbury.jpg",
//"../../TestImages/Formats/Jpg/gamma_dalai_lama_gray.jpg",
//"../../TestImages/Formats/Jpg/greyscale.jpg",
//"../../TestImages/Formats/Bmp/Car.bmp",

3
tests/ImageProcessor.Tests/TestImages/Formats/Jpg/lomo.jpg

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:bdfad9ce367629518c374b27b8ce311d1f0326f61b9a0ed113b5b966dd3dd1bc
size 45508

1
tests/ImageProcessor.Tests/TestImages/Formats/Jpg/shaftesbury.jpg.REMOVED.git-id

@ -0,0 +1 @@
2eabac96326130ba423b3fecb5a163b734278370
Loading…
Cancel
Save