diff --git a/src/ImageSharp/Common/Helpers/GaussianEliminationSolver.cs b/src/ImageSharp/Common/Helpers/GaussianEliminationSolver.cs index 840bc34e38..fdb4790609 100644 --- a/src/ImageSharp/Common/Helpers/GaussianEliminationSolver.cs +++ b/src/ImageSharp/Common/Helpers/GaussianEliminationSolver.cs @@ -6,7 +6,7 @@ namespace SixLabors.ImageSharp.Common.Helpers; /// /// Represents a solver for systems of linear equations using the Gaussian Elimination method. /// This class applies Gaussian Elimination to transform the matrix into row echelon form and then performs back substitution to find the solution vector. -/// This implementation is based on: https://www.algorithm-archive.org/contents/gaussian_elimination/gaussian_elimination.html +/// This implementation is based on: /// internal static class GaussianEliminationSolver { diff --git a/src/ImageSharp/Common/Helpers/QuadDistortionHelper.cs b/src/ImageSharp/Common/Helpers/QuadDistortionHelper.cs index 8c621c4861..27863f773a 100644 --- a/src/ImageSharp/Common/Helpers/QuadDistortionHelper.cs +++ b/src/ImageSharp/Common/Helpers/QuadDistortionHelper.cs @@ -21,7 +21,7 @@ internal static class QuadDistortionHelper /// The computed projection matrix for the quad distortion. /// /// This method is based on the algorithm described in the following article: - /// https://blog.mbedded.ninja/mathematics/geometry/projective-transformations/ + /// /// public static Matrix4x4 ComputeQuadDistortMatrix(Rectangle rectangle, PointF topLeft, PointF topRight, PointF bottomRight, PointF bottomLeft) { @@ -65,7 +65,7 @@ internal static class QuadDistortionHelper Matrix4x4 projectionMatrix = new( b[0], b[3], 0, b[6], b[1], b[4], 0, b[7], - 0, 0, 1, 0, + 0, 0, 1, 0, b[2], b[5], 0, 1); #pragma warning restore SA1117 diff --git a/src/ImageSharp/Processing/ProjectiveTransformBuilder.cs b/src/ImageSharp/Processing/ProjectiveTransformBuilder.cs index 06eeff9623..d5dedb1a7c 100644 --- a/src/ImageSharp/Processing/ProjectiveTransformBuilder.cs +++ b/src/ImageSharp/Processing/ProjectiveTransformBuilder.cs @@ -289,9 +289,7 @@ public class ProjectiveTransformBuilder /// The bottom-left corner point of the distorted quad. /// The . public ProjectiveTransformBuilder PrependQuadDistortion(PointF topLeft, PointF topRight, PointF bottomRight, PointF bottomLeft) - => this.Prepend( - size => QuadDistortionHelper.ComputeQuadDistortMatrix(new Rectangle(Point.Empty, size), topLeft, topRight, bottomRight, bottomLeft), - size => QuadDistortionHelper.ComputeQuadDistortMatrix(new Rectangle(Point.Empty, size), topLeft, topRight, bottomRight, bottomLeft)); + => this.Prepend(size => QuadDistortionHelper.ComputeQuadDistortMatrix(new Rectangle(Point.Empty, size), topLeft, topRight, bottomRight, bottomLeft)); /// /// Appends a quad distortion matrix using the specified corner points. @@ -302,10 +300,7 @@ public class ProjectiveTransformBuilder /// The bottom-left corner point of the distorted quad. /// The . public ProjectiveTransformBuilder AppendQuadDistortion(PointF topLeft, PointF topRight, PointF bottomRight, PointF bottomLeft) - => this.Append( - size => QuadDistortionHelper.ComputeQuadDistortMatrix(new Rectangle(Point.Empty, size), topLeft, topRight, bottomRight, bottomLeft), - size => QuadDistortionHelper.ComputeQuadDistortMatrix(new Rectangle(Point.Empty, size), topLeft, topRight, bottomRight, bottomLeft) - ); + => this.Append(size => QuadDistortionHelper.ComputeQuadDistortMatrix(new Rectangle(Point.Empty, size), topLeft, topRight, bottomRight, bottomLeft)); /// /// Prepends a raw matrix.