diff --git a/src/ImageSharp/Formats/Gif/Sections/GifNetscapeLoopingApplicationExtension.cs b/src/ImageSharp/Formats/Gif/Sections/GifNetscapeLoopingApplicationExtension.cs index 49a52edf6..8af5b81c2 100644 --- a/src/ImageSharp/Formats/Gif/Sections/GifNetscapeLoopingApplicationExtension.cs +++ b/src/ImageSharp/Formats/Gif/Sections/GifNetscapeLoopingApplicationExtension.cs @@ -1,4 +1,4 @@ -// Copyright (c) Six Labors and contributors. +// Copyright (c) Six Labors and contributors. // Licensed under the Apache License, Version 2.0. using System; @@ -33,7 +33,7 @@ namespace SixLabors.ImageSharp.Formats.Gif // Application Data ---- buffer[12] = 3; // Application block length (always 3) - buffer[13] = 1; // Data sub-block indentity (always 1) + buffer[13] = 1; // Data sub-block identity (always 1) // 0 means loop indefinitely. Count is set as play n + 1 times. BinaryPrimitives.WriteUInt16LittleEndian(buffer.Slice(14, 2), this.RepeatCount); diff --git a/src/ImageSharp/Memory/MemoryOwnerExtensions.cs b/src/ImageSharp/Memory/MemoryOwnerExtensions.cs index 9b68f52c4..d82e3aaee 100644 --- a/src/ImageSharp/Memory/MemoryOwnerExtensions.cs +++ b/src/ImageSharp/Memory/MemoryOwnerExtensions.cs @@ -22,7 +22,7 @@ namespace SixLabors.ImageSharp.Memory => buffer.GetSpan().Length; /// - /// Gets a to an offseted position inside the buffer. + /// Gets a to an offsetted position inside the buffer. /// /// The buffer /// The start @@ -60,4 +60,4 @@ namespace SixLabors.ImageSharp.Memory where T : struct => ref MemoryMarshal.GetReference(buffer.GetSpan()); } -} \ No newline at end of file +} diff --git a/src/ImageSharp/PixelFormats/PixelAlphaCompositionMode.cs b/src/ImageSharp/PixelFormats/PixelAlphaCompositionMode.cs index 0d182d3c2..62dc0fcf5 100644 --- a/src/ImageSharp/PixelFormats/PixelAlphaCompositionMode.cs +++ b/src/ImageSharp/PixelFormats/PixelAlphaCompositionMode.cs @@ -1,4 +1,4 @@ -// Copyright (c) Six Labors and contributors. +// Copyright (c) Six Labors and contributors. // Licensed under the Apache License, Version 2.0. namespace SixLabors.ImageSharp.PixelFormats @@ -39,7 +39,7 @@ namespace SixLabors.ImageSharp.PixelFormats Dest, /// - /// The source where they don't overlap othersie dest in overlapping parts. + /// The source where they don't overlap otherwise dest in overlapping parts. /// DestAtop, diff --git a/src/ImageSharp/Primitives/Complex64.cs b/src/ImageSharp/Primitives/Complex64.cs index 75905a9bd..96883229c 100644 --- a/src/ImageSharp/Primitives/Complex64.cs +++ b/src/ImageSharp/Primitives/Complex64.cs @@ -1,4 +1,4 @@ -// Copyright (c) Six Labors and contributors. +// Copyright (c) Six Labors and contributors. // Licensed under the Apache License, Version 2.0. using System; @@ -37,7 +37,7 @@ namespace SixLabors.ImageSharp.Primitives } /// - /// Performs the multiplication operation between a intance and a scalar. + /// Performs the multiplication operation between a instance and a scalar. /// /// The value to multiply. /// The scalar to use to multiply the value. @@ -46,7 +46,7 @@ namespace SixLabors.ImageSharp.Primitives public static Complex64 operator *(Complex64 value, float scalar) => new Complex64(value.Real * scalar, value.Imaginary * scalar); /// - /// Performs the multiplication operation between a intance and a . + /// Performs the multiplication operation between a instance and a . /// /// The value to multiply. /// The instance to use to multiply the value. @@ -58,7 +58,7 @@ namespace SixLabors.ImageSharp.Primitives } /// - /// Performs the multiplication operation between a intance and a . + /// Performs the multiplication operation between a instance and a . /// /// The value to multiply. /// The instance to use to multiply the value. diff --git a/src/ImageSharp/Processing/Processors/Normalization/AdaptiveHistogramEqualizationSlidingWindowProcessor{TPixel}.cs b/src/ImageSharp/Processing/Processors/Normalization/AdaptiveHistogramEqualizationSlidingWindowProcessor{TPixel}.cs index 40e2d41d9..947268750 100644 --- a/src/ImageSharp/Processing/Processors/Normalization/AdaptiveHistogramEqualizationSlidingWindowProcessor{TPixel}.cs +++ b/src/ImageSharp/Processing/Processors/Normalization/AdaptiveHistogramEqualizationSlidingWindowProcessor{TPixel}.cs @@ -55,10 +55,10 @@ namespace SixLabors.ImageSharp.Processing.Processors.Normalization var parallelOptions = new ParallelOptions() { MaxDegreeOfParallelism = configuration.MaxDegreeOfParallelism }; int tileWidth = source.Width / this.Tiles; int tileHeight = tileWidth; - int pixeInTile = tileWidth * tileHeight; + int pixelInTile = tileWidth * tileHeight; int halfTileHeight = tileHeight / 2; int halfTileWidth = halfTileHeight; - var slidingWindowInfos = new SlidingWindowInfos(tileWidth, tileHeight, halfTileWidth, halfTileHeight, pixeInTile); + var slidingWindowInfos = new SlidingWindowInfos(tileWidth, tileHeight, halfTileWidth, halfTileHeight, pixelInTile); using (Buffer2D targetPixels = configuration.MemoryAllocator.Allocate2D(source.Width, source.Height)) { @@ -149,7 +149,7 @@ namespace SixLabors.ImageSharp.Processing.Processors.Normalization /// The source image. /// The memory allocator. /// The target pixels. - /// Informations about the sliding window dimensions. + /// about the sliding window dimensions. /// The y start position. /// The y end position. /// if set to true the borders of the image will not be checked. @@ -204,7 +204,7 @@ namespace SixLabors.ImageSharp.Processing.Processors.Normalization { // Clipping the histogram, but doing it on a copy to keep the original un-clipped values for the next iteration. histogram.CopyTo(histogramCopy); - this.ClipHistogram(histogramCopy, this.ClipLimitPercentage, swInfos.PixeInTile); + this.ClipHistogram(histogramCopy, this.ClipLimitPercentage, swInfos.PixelInTile); } // Calculate the cumulative distribution function, which will map each input pixel in the current tile to a new value. @@ -212,7 +212,7 @@ namespace SixLabors.ImageSharp.Processing.Processors.Normalization ? this.CalculateCdf(ref cdfBase, ref histogramCopyBase, histogram.Length - 1) : this.CalculateCdf(ref cdfBase, ref histogramBase, histogram.Length - 1); - float numberOfPixelsMinusCdfMin = swInfos.PixeInTile - cdfMin; + float numberOfPixelsMinusCdfMin = swInfos.PixelInTile - cdfMin; // Map the current pixel to the new equalized value. int luminance = GetLuminance(source[x, y], this.LuminanceLevels); @@ -367,24 +367,24 @@ namespace SixLabors.ImageSharp.Processing.Processors.Normalization private class SlidingWindowInfos { - public SlidingWindowInfos(int tileWidth, int tileHeight, int halfTileWidth, int halfTileHeight, int pixeInTile) + public SlidingWindowInfos(int tileWidth, int tileHeight, int halfTileWidth, int halfTileHeight, int pixelInTile) { this.TileWidth = tileWidth; this.TileHeight = tileHeight; this.HalfTileWidth = halfTileWidth; this.HalfTileHeight = halfTileHeight; - this.PixeInTile = pixeInTile; + this.PixelInTile = pixelInTile; } public int TileWidth { get; private set; } public int TileHeight { get; private set; } - public int PixeInTile { get; private set; } + public int PixelInTile { get; private set; } public int HalfTileWidth { get; private set; } public int HalfTileHeight { get; private set; } } } -} \ No newline at end of file +} diff --git a/src/ImageSharp/Processing/Processors/Transforms/TransformUtils.cs b/src/ImageSharp/Processing/Processors/Transforms/TransformUtils.cs index 0ec8c8393..794645550 100644 --- a/src/ImageSharp/Processing/Processors/Transforms/TransformUtils.cs +++ b/src/ImageSharp/Processing/Processors/Transforms/TransformUtils.cs @@ -1,4 +1,4 @@ -// Copyright (c) Six Labors and contributors. +// Copyright (c) Six Labors and contributors. // Licensed under the Apache License, Version 2.0. using System; @@ -111,7 +111,7 @@ namespace SixLabors.ImageSharp.Processing.Processors.Transforms Matrix4x4 matrix = Matrix4x4.Identity; /* - * SkMatrix is layed out in the following manner: + * SkMatrix is laid out in the following manner: * * [ ScaleX SkewY Persp0 ] * [ SkewX ScaleY Persp1 ] @@ -329,7 +329,7 @@ namespace SixLabors.ImageSharp.Processing.Processors.Transforms int width = rectangle.Left < 0 ? rectangle.Right : Math.Max(rectangle.Width, rectangle.Right); // If location in either direction is translated to a negative value equal to or exceeding the - // dimensions in eith direction we need to reassign the dimension. + // dimensions in either direction we need to reassign the dimension. if (height <= 0) { height = rectangle.Height; diff --git a/tests/ImageSharp.Benchmarks/Codecs/Jpeg/BlockOperations/Block8x8F_DivideRound.cs b/tests/ImageSharp.Benchmarks/Codecs/Jpeg/BlockOperations/Block8x8F_DivideRound.cs index 5502475d4..15a3c7eb7 100644 --- a/tests/ImageSharp.Benchmarks/Codecs/Jpeg/BlockOperations/Block8x8F_DivideRound.cs +++ b/tests/ImageSharp.Benchmarks/Codecs/Jpeg/BlockOperations/Block8x8F_DivideRound.cs @@ -1,4 +1,4 @@ -// Copyright (c) Six Labors and contributors. +// Copyright (c) Six Labors and contributors. // Licensed under the Apache License, Version 2.0. using System.Numerics; @@ -25,7 +25,7 @@ namespace SixLabors.ImageSharp.Benchmarks.Codecs.Jpeg.BlockOperations private static readonly Vector4 Half = new Vector4(0.5f); private Block8x8F inputDividend; - private Block8x8F inputDivisior; + private Block8x8F inputDivisor; [GlobalSetup] public void Setup() @@ -33,7 +33,7 @@ namespace SixLabors.ImageSharp.Benchmarks.Codecs.Jpeg.BlockOperations for (int i = 0; i < Block8x8F.Size; i++) { this.inputDividend[i] = i*44.8f; - this.inputDivisior[i] = 100 - i; + this.inputDivisor[i] = 100 - i; } } @@ -43,7 +43,7 @@ namespace SixLabors.ImageSharp.Benchmarks.Codecs.Jpeg.BlockOperations int sum = 0; Block8x8F b1 = this.inputDividend; - Block8x8F b2 = this.inputDivisior; + Block8x8F b2 = this.inputDivisor; float* pDividend = (float*)&b1; float* pDivisor = (float*)&b2; @@ -73,7 +73,7 @@ namespace SixLabors.ImageSharp.Benchmarks.Codecs.Jpeg.BlockOperations int sum = 0; Block8x8F b1 = this.inputDividend; - Block8x8F b2 = this.inputDivisior; + Block8x8F b2 = this.inputDivisor; float* pDividend = (float*)&b1; float* pDivisor = (float*)&b2; @@ -99,7 +99,7 @@ namespace SixLabors.ImageSharp.Benchmarks.Codecs.Jpeg.BlockOperations int sum = 0; Block8x8F bDividend = this.inputDividend; - Block8x8F bDivisor = this.inputDivisior; + Block8x8F bDivisor = this.inputDivisor; float* pDividend = (float*)&bDividend; for (int cnt = 0; cnt < ExecutionCount; cnt++) @@ -155,4 +155,4 @@ namespace SixLabors.ImageSharp.Benchmarks.Codecs.Jpeg.BlockOperations return -((-dividend + (divisor >> 1)) / divisor); } } -} \ No newline at end of file +} diff --git a/tests/ImageSharp.Benchmarks/Codecs/MultiImageBenchmarkBase.cs b/tests/ImageSharp.Benchmarks/Codecs/MultiImageBenchmarkBase.cs index 84e2d0616..bf694211d 100644 --- a/tests/ImageSharp.Benchmarks/Codecs/MultiImageBenchmarkBase.cs +++ b/tests/ImageSharp.Benchmarks/Codecs/MultiImageBenchmarkBase.cs @@ -1,4 +1,4 @@ -// Copyright (c) Six Labors and contributors. +// Copyright (c) Six Labors and contributors. // Licensed under the Apache License, Version 2.0. using BenchmarkDotNet.Configs; @@ -143,7 +143,7 @@ namespace SixLabors.ImageSharp.Benchmarks.Codecs } /// - /// Execute code for each image stream. If the returned object of the opearation is it will be disposed. + /// Execute code for each image stream. If the returned object of the operation is it will be disposed. /// /// The operation to execute. If the returned object is <see cref="IDisposable"/> it will be disposed protected void ForEachStream(Func operation) @@ -271,4 +271,4 @@ namespace SixLabors.ImageSharp.Benchmarks.Codecs } } } -} \ No newline at end of file +} diff --git a/tests/ImageSharp.Benchmarks/Color/RgbToYCbCr.cs b/tests/ImageSharp.Benchmarks/Color/RgbToYCbCr.cs index b4e5ab380..b8235fac8 100644 --- a/tests/ImageSharp.Benchmarks/Color/RgbToYCbCr.cs +++ b/tests/ImageSharp.Benchmarks/Color/RgbToYCbCr.cs @@ -1,4 +1,4 @@ -// Copyright (c) Six Labors and contributors. +// Copyright (c) Six Labors and contributors. // Licensed under the Apache License, Version 2.0. using System.Numerics; @@ -228,7 +228,7 @@ namespace SixLabors.ImageSharp.Benchmarks } /// - /// This should perform better. Coreclr emmitted Vector.Dot() code lacks the vectorization even with IsHardwareAccelerated == true. + /// This should perform better. Coreclr emitted Vector.Dot() code lacks the vectorization even with IsHardwareAccelerated == true. /// Kept this benchmark because maybe it will be improved in a future CLR release. /// /// https://www.gamedev.net/topic/673396-c-systemnumericsvectors-slow/ diff --git a/tests/ImageSharp.Benchmarks/General/BasicMath/ClampInt32IntoByte.cs b/tests/ImageSharp.Benchmarks/General/BasicMath/ClampInt32IntoByte.cs index a8686fc18..c01d988ee 100644 --- a/tests/ImageSharp.Benchmarks/General/BasicMath/ClampInt32IntoByte.cs +++ b/tests/ImageSharp.Benchmarks/General/BasicMath/ClampInt32IntoByte.cs @@ -1,4 +1,4 @@ -// Copyright (c) Six Labors and contributors. +// Copyright (c) Six Labors and contributors. // Licensed under the Apache License, Version 2.0. using System; @@ -76,8 +76,8 @@ namespace SixLabors.ImageSharp.Benchmarks.General.BasicMath public byte ClampBitwise() { int x = this.Value; - int absmax = byte.MaxValue - x; - x = (x + byte.MaxValue - AbsBitwiseVer(ref absmax)) >> 1; + int absMax = byte.MaxValue - x; + x = (x + byte.MaxValue - AbsBitwiseVer(ref absMax)) >> 1; x = (x + byte.MinValue + AbsBitwiseVer(ref x)) >> 1; return (byte)x; diff --git a/tests/ImageSharp.Benchmarks/General/CopyBuffers.cs b/tests/ImageSharp.Benchmarks/General/CopyBuffers.cs index 32f1d10c7..6af466e42 100644 --- a/tests/ImageSharp.Benchmarks/General/CopyBuffers.cs +++ b/tests/ImageSharp.Benchmarks/General/CopyBuffers.cs @@ -1,4 +1,4 @@ -// Copyright (c) Six Labors and contributors. +// Copyright (c) Six Labors and contributors. // Licensed under the Apache License, Version 2.0. using System; @@ -33,8 +33,8 @@ namespace SixLabors.ImageSharp.Benchmarks.General [Params(10, 50, 100, 1000, 10000)] public int Count { get; set; } - - + + [GlobalSetup] public void Setup() { @@ -93,7 +93,7 @@ namespace SixLabors.ImageSharp.Benchmarks.General { Unsafe.CopyBlock(ref this.destArray[0], ref this.sourceArray[0], (uint)this.Count); } - + [Benchmark(Description = "Unsafe.CopyBlock(ptr)")] public unsafe void UnsafeCopyBlockPointers() { @@ -101,13 +101,13 @@ namespace SixLabors.ImageSharp.Benchmarks.General void* pinnedSource = this.sourceHandle.Pointer; Unsafe.CopyBlock(pinnedDestination, pinnedSource, (uint)this.Count); } - + [Benchmark(Description = "Unsafe.CopyBlockUnaligned(ref)")] public unsafe void UnsafeCopyBlockUnalignedReferences() { Unsafe.CopyBlockUnaligned(ref this.destArray[0], ref this.sourceArray[0], (uint)this.Count); } - + [Benchmark(Description = "Unsafe.CopyBlockUnaligned(ptr)")] public unsafe void UnsafeCopyBlockUnalignedPointers() { @@ -115,7 +115,7 @@ namespace SixLabors.ImageSharp.Benchmarks.General void* pinnedSource = this.sourceHandle.Pointer; Unsafe.CopyBlockUnaligned(pinnedDestination, pinnedSource, (uint)this.Count); } - + // BenchmarkDotNet=v0.11.3, OS=Windows 10.0.17134.706 (1803/April2018Update/Redstone4) // Intel Core i7-7700HQ CPU 2.80GHz (Kaby Lake), 1 CPU, 8 logical and 4 physical cores // Frequency=2742189 Hz, Resolution=364.6722 ns, Timer=TSC @@ -123,9 +123,9 @@ namespace SixLabors.ImageSharp.Benchmarks.General // [Host] : .NET Core 2.1.9 (CoreCLR 4.6.27414.06, CoreFX 4.6.27415.01), 64bit RyuJIT // Clr : .NET Framework 4.7.2 (CLR 4.0.30319.42000), 64bit RyuJIT-v4.7.3394.0 // Core : .NET Core 2.1.9 (CoreCLR 4.6.27414.06, CoreFX 4.6.27415.01), 64bit RyuJIT - // - // IterationCount=3 LaunchCount=1 WarmupCount=3 - // + // + // IterationCount=3 LaunchCount=1 WarmupCount=3 + // // | Method | Job | Runtime | Count | Mean | Error | StdDev | Ratio | RatioSD | Gen 0 | Gen 1 | Gen 2 | Allocated | // |------------------------------- |----- |-------- |------ |-----------:|-----------:|----------:|------:|--------:|------:|------:|------:|----------:| // | Array.Copy() | Clr | Clr | 10 | 23.636 ns | 2.5299 ns | 0.1387 ns | 1.00 | 0.00 | - | - | - | - | @@ -228,4 +228,4 @@ namespace SixLabors.ImageSharp.Benchmarks.General // | Unsafe.CopyBlockUnaligned(ref) | Core | Core | 10000 | 187.489 ns | 13.1527 ns | 0.7209 ns | 0.92 | 0.00 | - | - | - | - | // | Unsafe.CopyBlockUnaligned(ptr) | Core | Core | 10000 | 186.586 ns | 4.6274 ns | 0.2536 ns | 0.91 | 0.00 | - | - | - | - | } -} \ No newline at end of file +} diff --git a/tests/ImageSharp.Benchmarks/General/Vectorization/UInt32ToSingle.cs b/tests/ImageSharp.Benchmarks/General/Vectorization/UInt32ToSingle.cs index ca85a350c..d7ffb332d 100644 --- a/tests/ImageSharp.Benchmarks/General/Vectorization/UInt32ToSingle.cs +++ b/tests/ImageSharp.Benchmarks/General/Vectorization/UInt32ToSingle.cs @@ -1,4 +1,4 @@ -using System.Numerics; +using System.Numerics; using System.Runtime.CompilerServices; using BenchmarkDotNet.Attributes; @@ -27,7 +27,7 @@ namespace SixLabors.ImageSharp.Benchmarks.General.Vectorization var bVec = new Vector(256.0f / 255.0f); var magicFloat = new Vector(32768.0f); - var magicInt = new Vector(1191182336); // reinterpreded value of 32768.0f + var magicInt = new Vector(1191182336); // reinterpreted value of 32768.0f var mask = new Vector(255); for (int i = 0; i < n; i++) @@ -110,4 +110,4 @@ namespace SixLabors.ImageSharp.Benchmarks.General.Vectorization } } } -} \ No newline at end of file +} diff --git a/tests/ImageSharp.Benchmarks/Samplers/Glow.cs b/tests/ImageSharp.Benchmarks/Samplers/Glow.cs index 263ce6a7e..28cb04735 100644 --- a/tests/ImageSharp.Benchmarks/Samplers/Glow.cs +++ b/tests/ImageSharp.Benchmarks/Samplers/Glow.cs @@ -1,4 +1,4 @@ -// Copyright (c) Six Labors and contributors. +// Copyright (c) Six Labors and contributors. // Licensed under the Apache License, Version 2.0. using System; @@ -144,7 +144,7 @@ namespace SixLabors.ImageSharp.Benchmarks { amount = amount.Clamp(0, 1); - // Santize on zero alpha + // Sanitize on zero alpha if (Math.Abs(backdrop.W) < Constants.Epsilon) { source.W *= amount; @@ -173,4 +173,4 @@ namespace SixLabors.ImageSharp.Benchmarks } } } -} \ No newline at end of file +} diff --git a/tests/ImageSharp.Tests/Formats/Bmp/BmpDecoderTests.cs b/tests/ImageSharp.Tests/Formats/Bmp/BmpDecoderTests.cs index dadce92d1..a2623ce17 100644 --- a/tests/ImageSharp.Tests/Formats/Bmp/BmpDecoderTests.cs +++ b/tests/ImageSharp.Tests/Formats/Bmp/BmpDecoderTests.cs @@ -283,8 +283,8 @@ namespace SixLabors.ImageSharp.Tests.Formats.Bmp // seems to be wrong. This bitmap has an alpha channel of two bits. In many cases this alpha channel has a value of 3, // which should be remapped to 255 for RGBA32, but the magick decoder has a value of 191 set. // The total difference without the alpha channel is still: 0.0204% - // Exporting the image as PNG with GIMP yields to the same result as the imagesharp implementation. - image.CompareToOriginal(provider, ImageComparer.TolerantPercentage(6.1f), new MagickReferenceDecoder()); + // Exporting the image as PNG with GIMP yields to the same result as the ImageSharp implementation. + image.CompareToOriginal(provider, ImageComparer.TolerantPercentage(6.1f), new MagickReferenceDecoder()); } } diff --git a/tests/ImageSharp.Tests/Formats/ImageFormatManagerTests.cs b/tests/ImageSharp.Tests/Formats/ImageFormatManagerTests.cs index 8628d054a..9a15e1c1b 100644 --- a/tests/ImageSharp.Tests/Formats/ImageFormatManagerTests.cs +++ b/tests/ImageSharp.Tests/Formats/ImageFormatManagerTests.cs @@ -1,4 +1,4 @@ -// Copyright (c) Six Labors and contributors. +// Copyright (c) Six Labors and contributors. // Licensed under the Apache License, Version 2.0. using System; @@ -42,7 +42,7 @@ namespace SixLabors.ImageSharp.Tests } [Fact] - public void AddImageFormatDetectorNullthrows() + public void AddImageFormatDetectorNullThrows() { Assert.Throws(() => { diff --git a/tests/ImageSharp.Tests/Formats/Jpg/JpegDecoderTests.MetaData.cs b/tests/ImageSharp.Tests/Formats/Jpg/JpegDecoderTests.MetaData.cs index 308cf28b3..8d8d31693 100644 --- a/tests/ImageSharp.Tests/Formats/Jpg/JpegDecoderTests.MetaData.cs +++ b/tests/ImageSharp.Tests/Formats/Jpg/JpegDecoderTests.MetaData.cs @@ -19,7 +19,7 @@ namespace SixLabors.ImageSharp.Tests.Formats.Jpg public partial class JpegDecoderTests { - // TODO: A JPEGsnoop & metadata expert should review if the Exif/Icc expectations are correct. + // TODO: A JPEGsnoop & metadata expert should review if the Exif/Icc expectations are correct. // I'm seeing several entries with Exif-related names in images where we do not decode an exif profile. (- Anton) public static readonly TheoryData MetaDataTestData = new TheoryData @@ -257,4 +257,4 @@ namespace SixLabors.ImageSharp.Tests.Formats.Jpg }); } } -} \ No newline at end of file +} diff --git a/tests/ImageSharp.Tests/Formats/Jpg/JpegDecoderTests.cs b/tests/ImageSharp.Tests/Formats/Jpg/JpegDecoderTests.cs index e316fe67e..36a160e59 100644 --- a/tests/ImageSharp.Tests/Formats/Jpg/JpegDecoderTests.cs +++ b/tests/ImageSharp.Tests/Formats/Jpg/JpegDecoderTests.cs @@ -93,7 +93,7 @@ namespace SixLabors.ImageSharp.Tests.Formats.Jpg return; } - // For 32 bit test enviroments: + // For 32 bit test environments: provider.Configuration.MemoryAllocator = ArrayPoolMemoryAllocator.CreateWithModeratePooling(); using (Image image = provider.GetImage(JpegDecoder)) @@ -125,7 +125,7 @@ namespace SixLabors.ImageSharp.Tests.Formats.Jpg return "0%"; } - + // DEBUG ONLY! // The PDF.js output should be saved by "tests\ImageSharp.Tests\Formats\Jpg\pdfjs\jpeg-converter.htm" // into "\tests\Images\ActualOutput\JpegDecoderTests\" @@ -158,4 +158,4 @@ namespace SixLabors.ImageSharp.Tests.Formats.Jpg } } } -} \ No newline at end of file +} diff --git a/tests/ImageSharp.Tests/Formats/Jpg/ParseStreamTests.cs b/tests/ImageSharp.Tests/Formats/Jpg/ParseStreamTests.cs index 3657110c6..f4f3b83b4 100644 --- a/tests/ImageSharp.Tests/Formats/Jpg/ParseStreamTests.cs +++ b/tests/ImageSharp.Tests/Formats/Jpg/ParseStreamTests.cs @@ -30,11 +30,11 @@ namespace SixLabors.ImageSharp.Tests.Formats.Jpg [InlineData(TestImages.Jpeg.Baseline.Cmyk, JpegColorSpace.Cmyk)] public void ColorSpace_IsDeducedCorrectly(string imageFile, object expectedColorSpaceValue) { - var expecteColorSpace = (JpegColorSpace)expectedColorSpaceValue; + var expectedColorSpace = (JpegColorSpace)expectedColorSpaceValue; using (JpegDecoderCore decoder = JpegFixture.ParseJpegStream(imageFile)) { - Assert.Equal(expecteColorSpace, decoder.ColorSpace); + Assert.Equal(expectedColorSpace, decoder.ColorSpace); } } @@ -131,4 +131,4 @@ namespace SixLabors.ImageSharp.Tests.Formats.Jpg } } } -} \ No newline at end of file +} diff --git a/tests/ImageSharp.Tests/Formats/Jpg/Utils/ReferenceImplementations.LLM_FloatingPoint_DCT.cs b/tests/ImageSharp.Tests/Formats/Jpg/Utils/ReferenceImplementations.LLM_FloatingPoint_DCT.cs index e0e94cb31..46b9b4366 100644 --- a/tests/ImageSharp.Tests/Formats/Jpg/Utils/ReferenceImplementations.LLM_FloatingPoint_DCT.cs +++ b/tests/ImageSharp.Tests/Formats/Jpg/Utils/ReferenceImplementations.LLM_FloatingPoint_DCT.cs @@ -131,7 +131,7 @@ namespace SixLabors.ImageSharp.Tests.Formats.Jpg.Utils /// /// Original: https://github.com/norishigefukushima/dct_simd/blob/master/dct/dct8x8_simd.cpp#L239 - /// Applyies IDCT transformation on "s" copying transformed values to "d", using temporary block "temp" + /// Applies IDCT transformation on "s" copying transformed values to "d", using temporary block "temp" /// /// /// @@ -554,4 +554,4 @@ namespace SixLabors.ImageSharp.Tests.Formats.Jpg.Utils } } } -} \ No newline at end of file +} diff --git a/tests/ImageSharp.Tests/Formats/Jpg/Utils/ReferenceImplementations.cs b/tests/ImageSharp.Tests/Formats/Jpg/Utils/ReferenceImplementations.cs index 3892770d8..527cc3fed 100644 --- a/tests/ImageSharp.Tests/Formats/Jpg/Utils/ReferenceImplementations.cs +++ b/tests/ImageSharp.Tests/Formats/Jpg/Utils/ReferenceImplementations.cs @@ -1,4 +1,4 @@ -// Copyright (c) Six Labors and contributors. +// Copyright (c) Six Labors and contributors. // Licensed under the Apache License, Version 2.0. // ReSharper disable InconsistentNaming @@ -11,7 +11,7 @@ using SixLabors.ImageSharp.Formats.Jpeg.Components; namespace SixLabors.ImageSharp.Tests.Formats.Jpg.Utils { /// - /// This class contains simplified (unefficient) reference implementations to produce verification data for unit tests + /// This class contains simplified (inefficient) reference implementations to produce verification data for unit tests /// Floating point DCT code Ported from https://github.com/norishigefukushima/dct_simd /// internal static partial class ReferenceImplementations @@ -144,4 +144,4 @@ namespace SixLabors.ImageSharp.Tests.Formats.Jpg.Utils return -((-dividend + (divisor >> 1)) / divisor); } } -} \ No newline at end of file +} diff --git a/tests/ImageSharp.Tests/Formats/Png/PngSmokeTests.cs b/tests/ImageSharp.Tests/Formats/Png/PngSmokeTests.cs index b1408247c..e26aaf8e6 100644 --- a/tests/ImageSharp.Tests/Formats/Png/PngSmokeTests.cs +++ b/tests/ImageSharp.Tests/Formats/Png/PngSmokeTests.cs @@ -1,4 +1,4 @@ -// Copyright (c) Six Labors and contributors. +// Copyright (c) Six Labors and contributors. // Licensed under the Apache License, Version 2.0. using System.IO; @@ -18,7 +18,7 @@ namespace SixLabors.ImageSharp.Tests.Formats.Png public void GeneralTest(TestImageProvider provider) where TPixel : struct, IPixel { - // does saving a file then repoening mean both files are identical??? + // does saving a file then reopening mean both files are identical??? using (Image image = provider.GetImage()) using (MemoryStream ms = new MemoryStream()) { @@ -41,7 +41,7 @@ namespace SixLabors.ImageSharp.Tests.Formats.Png //public void CanSaveIndexedPng(TestImageProvider provider) // where TPixel : struct, IPixel //{ - // // does saving a file then repoening mean both files are identical??? + // // does saving a file then reopening mean both files are identical??? // using (Image image = provider.GetImage()) // using (MemoryStream ms = new MemoryStream()) // { @@ -61,7 +61,7 @@ namespace SixLabors.ImageSharp.Tests.Formats.Png //public void CanSaveIndexedPngTwice(TestImageProvider provider) // where TPixel : struct, IPixel //{ - // // does saving a file then repoening mean both files are identical??? + // // does saving a file then reopening mean both files are identical??? // using (Image source = provider.GetImage()) // using (MemoryStream ms = new MemoryStream()) // { @@ -103,7 +103,7 @@ namespace SixLabors.ImageSharp.Tests.Formats.Png public void Resize(TestImageProvider provider) where TPixel : struct, IPixel { - // does saving a file then repoening mean both files are identical??? + // does saving a file then reopening mean both files are identical??? using (Image image = provider.GetImage()) using (MemoryStream ms = new MemoryStream()) { diff --git a/tests/ImageSharp.Tests/GlobalSuppressions.cs b/tests/ImageSharp.Tests/GlobalSuppressions.cs index 3d161049b..2709d32eb 100644 --- a/tests/ImageSharp.Tests/GlobalSuppressions.cs +++ b/tests/ImageSharp.Tests/GlobalSuppressions.cs @@ -1,7 +1,7 @@ - -// This file is used by Code Analysis to maintain SuppressMessage + +// This file is used by Code Analysis to maintain SuppressMessage // attributes that are applied to this project. -// Project-level suppressions either have no target or are given +// Project-level suppressions either have no target or are given // a specific target and scoped to a namespace, type, member, etc. [assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Usage", "xUnit1026:Theory methods should use all of their parameters")] diff --git a/tests/ImageSharp.Tests/Image/ImageFrameCollectionTests.Generic.cs b/tests/ImageSharp.Tests/Image/ImageFrameCollectionTests.Generic.cs index 37c3a27cd..e4c7e2231 100644 --- a/tests/ImageSharp.Tests/Image/ImageFrameCollectionTests.Generic.cs +++ b/tests/ImageSharp.Tests/Image/ImageFrameCollectionTests.Generic.cs @@ -275,24 +275,24 @@ namespace SixLabors.ImageSharp.Tests public void AddFrame_clones_sourceFrame() { var pixelData = this.Image.Frames.RootFrame.GetPixelSpan().ToArray(); - var otherFRame = new ImageFrame(Configuration.Default, 10, 10); - var addedFrame = this.Image.Frames.AddFrame(otherFRame); - addedFrame.ComparePixelBufferTo(otherFRame.GetPixelSpan()); - Assert.NotEqual(otherFRame, addedFrame); + var otherFrame = new ImageFrame(Configuration.Default, 10, 10); + var addedFrame = this.Image.Frames.AddFrame(otherFrame); + addedFrame.ComparePixelBufferTo(otherFrame.GetPixelSpan()); + Assert.NotEqual(otherFrame, addedFrame); } [Fact] public void InsertFrame_clones_sourceFrame() { var pixelData = this.Image.Frames.RootFrame.GetPixelSpan().ToArray(); - var otherFRame = new ImageFrame(Configuration.Default, 10, 10); - var addedFrame = this.Image.Frames.InsertFrame(0, otherFRame); - addedFrame.ComparePixelBufferTo(otherFRame.GetPixelSpan()); - Assert.NotEqual(otherFRame, addedFrame); + var otherFrame = new ImageFrame(Configuration.Default, 10, 10); + var addedFrame = this.Image.Frames.InsertFrame(0, otherFrame); + addedFrame.ComparePixelBufferTo(otherFrame.GetPixelSpan()); + Assert.NotEqual(otherFrame, addedFrame); } [Fact] - public void MoveFrame_LeavesFrmaeInCorrectLocation() + public void MoveFrame_LeavesFrameInCorrectLocation() { for (var i = 0; i < 9; i++) { diff --git a/tests/ImageSharp.Tests/Image/ImageFrameCollectionTests.NonGeneric.cs b/tests/ImageSharp.Tests/Image/ImageFrameCollectionTests.NonGeneric.cs index fc0aafac6..50358a9d0 100644 --- a/tests/ImageSharp.Tests/Image/ImageFrameCollectionTests.NonGeneric.cs +++ b/tests/ImageSharp.Tests/Image/ImageFrameCollectionTests.NonGeneric.cs @@ -214,7 +214,7 @@ namespace SixLabors.ImageSharp.Tests } [Fact] - public void MoveFrame_LeavesFrmaeInCorrectLocation() + public void MoveFrame_LeavesFrameInCorrectLocation() { for (var i = 0; i < 9; i++) { diff --git a/tests/ImageSharp.Tests/Image/ImageTests.Save.cs b/tests/ImageSharp.Tests/Image/ImageTests.Save.cs index 45399919a..b8eb52d9e 100644 --- a/tests/ImageSharp.Tests/Image/ImageTests.Save.cs +++ b/tests/ImageSharp.Tests/Image/ImageTests.Save.cs @@ -1,4 +1,4 @@ -// Copyright (c) Six Labors and contributors. +// Copyright (c) Six Labors and contributors. // Licensed under the Apache License, Version 2.0. // ReSharper disable InconsistentNaming @@ -17,10 +17,10 @@ namespace SixLabors.ImageSharp.Tests public class Save { [Fact] - public void DetecedEncoding() + public void DetectedEncoding() { string dir = TestEnvironment.CreateOutputDirectory(nameof(ImageTests)); - string file = System.IO.Path.Combine(dir, "DetecedEncoding.png"); + string file = System.IO.Path.Combine(dir, "DetectedEncoding.png"); using (var image = new Image(10, 10)) { @@ -67,4 +67,4 @@ namespace SixLabors.ImageSharp.Tests } } } -} \ No newline at end of file +} diff --git a/tests/ImageSharp.Tests/ImageOperationTests.cs b/tests/ImageSharp.Tests/ImageOperationTests.cs index 30371f000..455e2c5f1 100644 --- a/tests/ImageSharp.Tests/ImageOperationTests.cs +++ b/tests/ImageSharp.Tests/ImageOperationTests.cs @@ -1,4 +1,4 @@ -// Copyright (c) Six Labors and contributors. +// Copyright (c) Six Labors and contributors. // Licensed under the Apache License, Version 2.0. using System; @@ -81,7 +81,7 @@ namespace SixLabors.ImageSharp.Tests } [Fact] - public void CloneCallsImageOperationsProvider_Func_NotOnOrigional() + public void CloneCallsImageOperationsProvider_Func_NotOnOriginal() { Image returned = this.image.Clone(x => x.ApplyProcessor(this.processorDefinition)); Assert.False(this.provider.HasCreated(this.image)); @@ -91,7 +91,7 @@ namespace SixLabors.ImageSharp.Tests } [Fact] - public void CloneCallsImageOperationsProvider_ListOfProcessors_NotOnOrigional() + public void CloneCallsImageOperationsProvider_ListOfProcessors_NotOnOriginal() { Image returned = this.image.Clone(this.processorDefinition); Assert.False(this.provider.HasCreated(this.image)); @@ -110,4 +110,4 @@ namespace SixLabors.ImageSharp.Tests public void Dispose() => this.image.Dispose(); } -} \ No newline at end of file +} diff --git a/tests/ImageSharp.Tests/MetaData/Profiles/ICC/DataWriter/IccDataWriter.PrimitivesTests.cs b/tests/ImageSharp.Tests/MetaData/Profiles/ICC/DataWriter/IccDataWriter.PrimitivesTests.cs index 098950be8..464a70141 100644 --- a/tests/ImageSharp.Tests/MetaData/Profiles/ICC/DataWriter/IccDataWriter.PrimitivesTests.cs +++ b/tests/ImageSharp.Tests/MetaData/Profiles/ICC/DataWriter/IccDataWriter.PrimitivesTests.cs @@ -1,4 +1,4 @@ -// Copyright (c) Six Labors and contributors. +// Copyright (c) Six Labors and contributors. // Licensed under the Apache License, Version 2.0. using System; @@ -46,7 +46,7 @@ namespace SixLabors.ImageSharp.Tests.Icc } [Fact] - public void WriteAsciiStringWithNegativeLenghtThrowsArgumentException() + public void WriteAsciiStringWithNegativeLengthThrowsArgumentException() { IccDataWriter writer = CreateWriter(); diff --git a/tests/ImageSharp.Tests/Numerics/SignedRationalTests.cs b/tests/ImageSharp.Tests/Numerics/SignedRationalTests.cs index 77920ba2f..f828cf74f 100644 --- a/tests/ImageSharp.Tests/Numerics/SignedRationalTests.cs +++ b/tests/ImageSharp.Tests/Numerics/SignedRationalTests.cs @@ -1,4 +1,4 @@ -// Copyright (c) Six Labors and contributors. +// Copyright (c) Six Labors and contributors. // Licensed under the Apache License, Version 2.0. using SixLabors.ImageSharp.Primitives; @@ -98,7 +98,7 @@ namespace SixLabors.ImageSharp.Tests } [Fact] - public void ToStringRepresention() + public void ToStringRepresentation() { var rational = new SignedRational(0, 0); Assert.Equal("[ Indeterminate ]", rational.ToString()); @@ -119,4 +119,4 @@ namespace SixLabors.ImageSharp.Tests Assert.Equal("1/2", rational.ToString()); } } -} \ No newline at end of file +} diff --git a/tests/ImageSharp.Tests/PixelFormats/PixelBlenders/PorterDuffFunctionsTests.cs b/tests/ImageSharp.Tests/PixelFormats/PixelBlenders/PorterDuffFunctionsTests.cs index 9a196d9d5..f0b27d486 100644 --- a/tests/ImageSharp.Tests/PixelFormats/PixelBlenders/PorterDuffFunctionsTests.cs +++ b/tests/ImageSharp.Tests/PixelFormats/PixelBlenders/PorterDuffFunctionsTests.cs @@ -1,4 +1,4 @@ -// Copyright (c) Six Labors and contributors. +// Copyright (c) Six Labors and contributors. // Licensed under the Apache License, Version 2.0. using System.Numerics; @@ -61,7 +61,7 @@ namespace SixLabors.ImageSharp.Tests.PixelFormats.PixelBlenders VectorAssert.Equal(expected, actual, 5); } - public static TheoryData SubstractFunctionData = new TheoryData() { + public static TheoryData SubtractFunctionData = new TheoryData() { { new TestVector4(1,1,1,1), new TestVector4(1,1,1,1), 1, new TestVector4(0,0,0,1) }, { new TestVector4(1,1,1,1), new TestVector4(0,0,0,.8f), .5f, new TestVector4(1,1,1, 1f) }, { @@ -73,8 +73,8 @@ namespace SixLabors.ImageSharp.Tests.PixelFormats.PixelBlenders }; [Theory] - [MemberData(nameof(SubstractFunctionData))] - public void SubstractFunction(TestVector4 back, TestVector4 source, float amount, TestVector4 expected) + [MemberData(nameof(SubtractFunctionData))] + public void SubtractFunction(TestVector4 back, TestVector4 source, float amount, TestVector4 expected) { Vector4 actual = PorterDuffFunctions.SubtractSrcOver((Vector4)back, source, amount); VectorAssert.Equal(expected, actual, 5); diff --git a/tests/ImageSharp.Tests/PixelFormats/PixelBlenders/PorterDuffFunctionsTests_TPixel.cs b/tests/ImageSharp.Tests/PixelFormats/PixelBlenders/PorterDuffFunctionsTests_TPixel.cs index 9ca1e30cc..0e270dfda 100644 --- a/tests/ImageSharp.Tests/PixelFormats/PixelBlenders/PorterDuffFunctionsTests_TPixel.cs +++ b/tests/ImageSharp.Tests/PixelFormats/PixelBlenders/PorterDuffFunctionsTests_TPixel.cs @@ -1,4 +1,4 @@ -// Copyright (c) Six Labors and contributors. +// Copyright (c) Six Labors and contributors. // Licensed under the Apache License, Version 2.0. using System; @@ -130,7 +130,7 @@ namespace SixLabors.ImageSharp.Tests.PixelFormats.PixelBlenders VectorAssert.Equal(expected, dest[0], 2); } - public static TheoryData SubstractFunctionData = new TheoryData() { + public static TheoryData SubtractFunctionData = new TheoryData() { { new TestPixel(1,1,1,1), new TestPixel(1,1,1,1), 1, new TestPixel(0,0,0,1) }, { new TestPixel(1,1,1,1), new TestPixel(0,0,0,.8f), .5f, new TestPixel(1,1,1, 1f) }, { @@ -142,8 +142,8 @@ namespace SixLabors.ImageSharp.Tests.PixelFormats.PixelBlenders }; [Theory] - [MemberData(nameof(SubstractFunctionData))] - public void SubstractFunction(TestPixel back, TestPixel source, float amount, TestPixel expected) + [MemberData(nameof(SubtractFunctionData))] + public void SubtractFunction(TestPixel back, TestPixel source, float amount, TestPixel expected) where TPixel : struct, IPixel { TPixel actual = PorterDuffFunctions.SubtractSrcOver((TPixel)back, source, amount); @@ -151,8 +151,8 @@ namespace SixLabors.ImageSharp.Tests.PixelFormats.PixelBlenders } [Theory] - [MemberData(nameof(SubstractFunctionData))] - public void SubstractFunctionBlender(TestPixel back, TestPixel source, float amount, TestPixel expected) + [MemberData(nameof(SubtractFunctionData))] + public void SubtractFunctionBlender(TestPixel back, TestPixel source, float amount, TestPixel expected) where TPixel : struct, IPixel { TPixel actual = new DefaultPixelBlenders.SubtractSrcOver().Blend(back, source, amount); @@ -160,8 +160,8 @@ namespace SixLabors.ImageSharp.Tests.PixelFormats.PixelBlenders } [Theory] - [MemberData(nameof(SubstractFunctionData))] - public void SubstractFunctionBlenderBulk(TestPixel back, TestPixel source, float amount, TestPixel expected) + [MemberData(nameof(SubtractFunctionData))] + public void SubtractFunctionBlenderBulk(TestPixel back, TestPixel source, float amount, TestPixel expected) where TPixel : struct, IPixel { var dest = new Span(new TPixel[1]); diff --git a/tests/ImageSharp.Tests/PixelFormats/Rgba32Tests.cs b/tests/ImageSharp.Tests/PixelFormats/Rgba32Tests.cs index 429a65583..1ab5f8e3d 100644 --- a/tests/ImageSharp.Tests/PixelFormats/Rgba32Tests.cs +++ b/tests/ImageSharp.Tests/PixelFormats/Rgba32Tests.cs @@ -1,4 +1,4 @@ -// Copyright (c) Six Labors and contributors. +// Copyright (c) Six Labors and contributors. // Licensed under the Apache License, Version 2.0. using System; @@ -107,7 +107,7 @@ namespace SixLabors.ImageSharp.Tests.PixelFormats } /// - /// Tests that the individual byte elements are layed out in RGBA order. + /// Tests that the individual byte elements are laid out in RGBA order. /// [Fact] public unsafe void ByteLayout() @@ -290,4 +290,4 @@ namespace SixLabors.ImageSharp.Tests.PixelFormats Assert.Equal(expected, rgb.PackedValue); } } -} \ No newline at end of file +} diff --git a/tests/ImageSharp.Tests/PixelFormats/RgbaVectorTests.cs b/tests/ImageSharp.Tests/PixelFormats/RgbaVectorTests.cs index 570d72cf4..fe2f8394f 100644 --- a/tests/ImageSharp.Tests/PixelFormats/RgbaVectorTests.cs +++ b/tests/ImageSharp.Tests/PixelFormats/RgbaVectorTests.cs @@ -1,4 +1,4 @@ -// Copyright (c) Six Labors and contributors. +// Copyright (c) Six Labors and contributors. // Licensed under the Apache License, Version 2.0. using System.Numerics; @@ -99,7 +99,7 @@ namespace SixLabors.ImageSharp.Tests.PixelFormats } /// - /// Tests that the individual float elements are layed out in RGBA order. + /// Tests that the individual float elements are laid out in RGBA order. /// [Fact] public void FloatLayout() @@ -189,4 +189,4 @@ namespace SixLabors.ImageSharp.Tests.PixelFormats Assert.Equal(expected, rgba.ToScaledVector4()); } } -} \ No newline at end of file +} diff --git a/tests/ImageSharp.Tests/Processing/Processors/Transforms/ResizeTests.cs b/tests/ImageSharp.Tests/Processing/Processors/Transforms/ResizeTests.cs index e6ae77a01..43384aee7 100644 --- a/tests/ImageSharp.Tests/Processing/Processors/Transforms/ResizeTests.cs +++ b/tests/ImageSharp.Tests/Processing/Processors/Transforms/ResizeTests.cs @@ -1,4 +1,4 @@ -// Copyright (c) Six Labors and contributors. +// Copyright (c) Six Labors and contributors. // Licensed under the Apache License, Version 2.0. using System; @@ -33,8 +33,8 @@ namespace SixLabors.ImageSharp.Tests.Processing.Processors.Transforms public static readonly string[] SmokeTestResamplerNames = { - nameof(KnownResamplers.NearestNeighbor), - nameof(KnownResamplers.Bicubic), + nameof(KnownResamplers.NearestNeighbor), + nameof(KnownResamplers.Bicubic), nameof(KnownResamplers.Box), nameof(KnownResamplers.Lanczos5), }; @@ -46,18 +46,18 @@ namespace SixLabors.ImageSharp.Tests.Processing.Processors.Transforms public void Resize_PixelAgnostic() { var filePath = TestFile.GetInputFileFullPath(TestImages.Jpeg.Baseline.Calliphora); - + using (Image image = Image.Load(filePath)) { image.Mutate(x => x.Resize(image.Size() / 2)); string path = System.IO.Path.Combine( TestEnvironment.CreateOutputDirectory(nameof(ResizeTests)), nameof(this.Resize_PixelAgnostic) + ".png"); - + image.Save(path); } } - + [Theory( Skip = "Debug only, enable manually" )] @@ -80,7 +80,7 @@ namespace SixLabors.ImageSharp.Tests.Processing.Processors.Transforms image.DebugSave(provider, appendPixelTypeToFileName: false); } } - + [Theory] [WithBasicTestPatternImages(15, 12, PixelTypes.Rgba32, 2, 3, 1, 2)] [WithBasicTestPatternImages(2, 256, PixelTypes.Rgba32, 1, 1, 1, 8)] @@ -92,7 +92,7 @@ namespace SixLabors.ImageSharp.Tests.Processing.Processors.Transforms // [WithBasicTestPatternImages(15, 12, PixelTypes.Rgba32, 2, 3, 1, 2)] means: // resizing: (15, 12) -> (10, 6) // kernel dimensions: (3, 4) - + using (Image image = provider.GetImage()) { @@ -122,9 +122,9 @@ namespace SixLabors.ImageSharp.Tests.Processing.Processors.Transforms using (Image image0 = provider.GetImage()) { Size destSize = image0.Size() / 4; - + Configuration configuration = Configuration.CreateDefaultInstance(); - + int workingBufferSizeHintInBytes = workingBufferLimitInRows * destSize.Width * SizeOfVector4; TestMemoryAllocator allocator = new TestMemoryAllocator(); configuration.MemoryAllocator = allocator; @@ -137,7 +137,7 @@ namespace SixLabors.ImageSharp.Tests.Processing.Processors.Transforms Configuration.Default.MemoryAllocator); int minimumWorkerAllocationInBytes = verticalKernelMap.MaxDiameter * 2 * destSize.Width * SizeOfVector4; verticalKernelMap.Dispose(); - + using (Image image = image0.Clone(configuration)) { image.Mutate(x => x.Resize(destSize, KnownResamplers.Bicubic, false)); @@ -151,12 +151,12 @@ namespace SixLabors.ImageSharp.Tests.Processing.Processors.Transforms provider, testOutputDetails: workingBufferLimitInRows, appendPixelTypeToFileName: false); - + Assert.NotEmpty(allocator.AllocationLog); int maxAllocationSize = allocator.AllocationLog.Where( e => e.ElementType == typeof(Vector4)).Max(e => e.LengthInBytes); - + Assert.True(maxAllocationSize <= Math.Max(workingBufferSizeHintInBytes, minimumWorkerAllocationInBytes)); } } @@ -284,7 +284,7 @@ namespace SixLabors.ImageSharp.Tests.Processing.Processors.Transforms { IResampler sampler = TestUtils.GetResampler(samplerName); - // NeirestNeighbourResampler is producing slightly different results With classic .NET framework on 32bit + // NearestNeighbourResampler is producing slightly different results With classic .NET framework on 32bit // most likely because of differences in numeric behavior. // The difference is well visible when comparing output for // Resize_WorksWithAllResamplers_TestPattern301x1180_NearestNeighbor-300x480.png @@ -297,7 +297,7 @@ namespace SixLabors.ImageSharp.Tests.Processing.Processors.Transforms // Let's make the working buffer size non-default: provider.Configuration.WorkingBufferSizeHintInBytes = 16 * 1024 * SizeOfVector4; - + provider.RunValidatingProcessorTest( ctx => { @@ -538,4 +538,4 @@ namespace SixLabors.ImageSharp.Tests.Processing.Processors.Transforms } } } -} \ No newline at end of file +} diff --git a/tests/ImageSharp.Tests/Processing/Transforms/ProjectiveTransformTests.cs b/tests/ImageSharp.Tests/Processing/Transforms/ProjectiveTransformTests.cs index 056f66af7..3679180f4 100644 --- a/tests/ImageSharp.Tests/Processing/Transforms/ProjectiveTransformTests.cs +++ b/tests/ImageSharp.Tests/Processing/Transforms/ProjectiveTransformTests.cs @@ -1,4 +1,4 @@ -// Copyright (c) Six Labors and contributors. +// Copyright (c) Six Labors and contributors. // Licensed under the Apache License, Version 2.0. using System; @@ -103,7 +103,7 @@ namespace SixLabors.ImageSharp.Tests.Processing.Transforms public void RawTransformMatchesDocumentedExample(TestImageProvider provider) where TPixel : struct, IPixel { - // Printing some extra output to help investigating roundoff errors: + // Printing some extra output to help investigating rounding errors: this.Output.WriteLine($"Vector.IsHardwareAccelerated: {Vector.IsHardwareAccelerated}"); // This test matches the output described in the example at @@ -160,4 +160,4 @@ namespace SixLabors.ImageSharp.Tests.Processing.Transforms return (IResampler)property.GetValue(null); } } -} \ No newline at end of file +} diff --git a/tests/ImageSharp.Tests/Quantization/QuantizedImageTests.cs b/tests/ImageSharp.Tests/Quantization/QuantizedImageTests.cs index 04e9803af..775001709 100644 --- a/tests/ImageSharp.Tests/Quantization/QuantizedImageTests.cs +++ b/tests/ImageSharp.Tests/Quantization/QuantizedImageTests.cs @@ -1,4 +1,4 @@ -// Copyright (c) Six Labors and contributors. +// Copyright (c) Six Labors and contributors. // Licensed under the Apache License, Version 2.0. using System; @@ -18,17 +18,17 @@ namespace SixLabors.ImageSharp.Tests public void QuantizersDitherByDefault() { var werner = new WernerPaletteQuantizer(); - var websafe = new WebSafePaletteQuantizer(); + var webSafe = new WebSafePaletteQuantizer(); var octree = new OctreeQuantizer(); var wu = new WuQuantizer(); Assert.NotNull(werner.Diffuser); - Assert.NotNull(websafe.Diffuser); + Assert.NotNull(webSafe.Diffuser); Assert.NotNull(octree.Diffuser); Assert.NotNull(wu.Diffuser); Assert.True(werner.CreateFrameQuantizer(this.Configuration).Dither); - Assert.True(websafe.CreateFrameQuantizer(this.Configuration).Dither); + Assert.True(webSafe.CreateFrameQuantizer(this.Configuration).Dither); Assert.True(octree.CreateFrameQuantizer(this.Configuration).Dither); Assert.True(wu.CreateFrameQuantizer(this.Configuration).Dither); } @@ -101,4 +101,4 @@ namespace SixLabors.ImageSharp.Tests return index; } } -} \ No newline at end of file +} diff --git a/tests/ImageSharp.Tests/TestFormat.cs b/tests/ImageSharp.Tests/TestFormat.cs index 069f10198..0a5611056 100644 --- a/tests/ImageSharp.Tests/TestFormat.cs +++ b/tests/ImageSharp.Tests/TestFormat.cs @@ -1,4 +1,4 @@ -// Copyright (c) Six Labors and contributors. +// Copyright (c) Six Labors and contributors. // Licensed under the Apache License, Version 2.0. using System; @@ -212,7 +212,7 @@ namespace SixLabors.ImageSharp.Tests pixelType = typeof(TPixel) }); - // TODO record this happend so we can verify it. + // TODO record this happened so we can verify it. return this.testFormat.Sample(); } diff --git a/tests/ImageSharp.Tests/TestUtilities/ArrayHelper.cs b/tests/ImageSharp.Tests/TestUtilities/ArrayHelper.cs index e35cbfa42..fdb694dcc 100644 --- a/tests/ImageSharp.Tests/TestUtilities/ArrayHelper.cs +++ b/tests/ImageSharp.Tests/TestUtilities/ArrayHelper.cs @@ -1,4 +1,4 @@ -// Copyright (c) Six Labors and contributors. +// Copyright (c) Six Labors and contributors. // Licensed under the Apache License, Version 2.0. using System.Linq; @@ -11,16 +11,16 @@ namespace SixLabors.ImageSharp.Tests /// Concatenates multiple arrays of the same type into one. /// /// The array type - /// The arrays to concatenate. The order is kept + /// The arrays to concatenate. The order is kept /// The concatenated array - public static T[] Concat(params T[][] arrs) + public static T[] Concat(params T[][] arrays) { - var result = new T[arrs.Sum(t => t.Length)]; + var result = new T[arrays.Sum(t => t.Length)]; int offset = 0; - for (int i = 0; i < arrs.Length; i++) + for (int i = 0; i < arrays.Length; i++) { - arrs[i].CopyTo(result, offset); - offset += arrs[i].Length; + arrays[i].CopyTo(result, offset); + offset += arrays[i].Length; } return result; } diff --git a/tests/ImageSharp.Tests/TestUtilities/Attributes/ImageDataAttributeBase.cs b/tests/ImageSharp.Tests/TestUtilities/Attributes/ImageDataAttributeBase.cs index 6107154d0..ee1665138 100644 --- a/tests/ImageSharp.Tests/TestUtilities/Attributes/ImageDataAttributeBase.cs +++ b/tests/ImageSharp.Tests/TestUtilities/Attributes/ImageDataAttributeBase.cs @@ -1,4 +1,4 @@ -// Copyright (c) Six Labors and contributors. +// Copyright (c) Six Labors and contributors. // Licensed under the Apache License, Version 2.0. using System; @@ -72,8 +72,8 @@ namespace SixLabors.ImageSharp.Tests addedRows = new[] { new object[0] }; } - bool firstIsprovider = this.FirstIsProvider(testMethod); - if (firstIsprovider) + bool firstIsProvider = this.FirstIsProvider(testMethod); + if (firstIsProvider) { return this.InnerGetData(testMethod, addedRows); } @@ -98,12 +98,12 @@ namespace SixLabors.ImageSharp.Tests { Type factoryType = typeof(TestImageProvider<>).MakeGenericType(kv.Value); - foreach (object[] originalFacoryMethodArgs in this.GetAllFactoryMethodArgs(testMethod, factoryType)) + foreach (object[] originalFactoryMethodArgs in this.GetAllFactoryMethodArgs(testMethod, factoryType)) { foreach (object[] row in memberData) { - object[] actualFactoryMethodArgs = new object[originalFacoryMethodArgs.Length + 2]; - Array.Copy(originalFacoryMethodArgs, actualFactoryMethodArgs, originalFacoryMethodArgs.Length); + object[] actualFactoryMethodArgs = new object[originalFactoryMethodArgs.Length + 2]; + Array.Copy(originalFactoryMethodArgs, actualFactoryMethodArgs, originalFactoryMethodArgs.Length); actualFactoryMethodArgs[actualFactoryMethodArgs.Length - 2] = testMethod; actualFactoryMethodArgs[actualFactoryMethodArgs.Length - 1] = kv.Key; @@ -192,4 +192,4 @@ namespace SixLabors.ImageSharp.Tests return () => propInfo.GetValue(null, null); } } -} \ No newline at end of file +} diff --git a/tests/ImageSharp.Tests/TestUtilities/ImageComparison/ExactImageComparer.cs b/tests/ImageSharp.Tests/TestUtilities/ImageComparison/ExactImageComparer.cs index 462782ba5..59167cc88 100644 --- a/tests/ImageSharp.Tests/TestUtilities/ImageComparison/ExactImageComparer.cs +++ b/tests/ImageSharp.Tests/TestUtilities/ImageComparison/ExactImageComparer.cs @@ -22,7 +22,7 @@ namespace SixLabors.ImageSharp.Tests.TestUtilities.ImageComparison int width = actual.Width; - // TODO: Comparing through Rgba64 may not be robust enough because of the existance of super high precision pixel types. + // TODO: Comparing through Rgba64 may not be robust enough because of the existence of super high precision pixel types. var aBuffer = new Rgba64[width]; var bBuffer = new Rgba64[width]; @@ -54,4 +54,4 @@ namespace SixLabors.ImageSharp.Tests.TestUtilities.ImageComparison return new ImageSimilarityReport(expected, actual, differences); } } -} \ No newline at end of file +} diff --git a/tests/ImageSharp.Tests/TestUtilities/ImageComparison/TolerantImageComparer.cs b/tests/ImageSharp.Tests/TestUtilities/ImageComparison/TolerantImageComparer.cs index be12f5621..8bed3a715 100644 --- a/tests/ImageSharp.Tests/TestUtilities/ImageComparison/TolerantImageComparer.cs +++ b/tests/ImageSharp.Tests/TestUtilities/ImageComparison/TolerantImageComparer.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.Runtime.CompilerServices; @@ -19,7 +19,7 @@ namespace SixLabors.ImageSharp.Tests.TestUtilities.ImageComparison /// Individual manhattan pixel difference is only added to total image difference when the individual difference is over 'perPixelManhattanThreshold'. /// /// The maximal tolerated difference represented by a value between 0.0 and 1.0 scaled to 0 and 65535. - /// Gets the threshold of the individual pixels before they acumulate towards the overall difference. + /// Gets the threshold of the individual pixels before they accumulate towards the overall difference. public TolerantImageComparer(float imageThreshold, int perPixelManhattanThreshold = 0) { Guard.MustBeGreaterThanOrEqualTo(imageThreshold, 0, nameof(imageThreshold)); @@ -49,7 +49,7 @@ namespace SixLabors.ImageSharp.Tests.TestUtilities.ImageComparison public float ImageThreshold { get; } /// - /// Gets the threshold of the individual pixels before they acumulate towards the overall difference. + /// Gets the threshold of the individual pixels before they accumulate towards the overall difference. /// For an individual pixel pair the value is the Manhattan distance of pixels: /// /// https://en.wikipedia.org/wiki/Taxicab_geometry @@ -66,7 +66,7 @@ namespace SixLabors.ImageSharp.Tests.TestUtilities.ImageComparison int width = actual.Width; - // TODO: Comparing through Rgba64 may not robust enough because of the existance of super high precision pixel types. + // TODO: Comparing through Rgba64 may not robust enough because of the existence of super high precision pixel types. var aBuffer = new Rgba64[width]; var bBuffer = new Rgba64[width]; @@ -120,4 +120,4 @@ namespace SixLabors.ImageSharp.Tests.TestUtilities.ImageComparison [MethodImpl(MethodImplOptions.AggressiveInlining)] private static int Diff(ushort a, ushort b) => Math.Abs(a - b); } -} \ No newline at end of file +} diff --git a/tests/ImageSharp.Tests/TestUtilities/ImageProviders/TestImageProvider.cs b/tests/ImageSharp.Tests/TestUtilities/ImageProviders/TestImageProvider.cs index 8d493c7d4..1a33efd34 100644 --- a/tests/ImageSharp.Tests/TestUtilities/ImageProviders/TestImageProvider.cs +++ b/tests/ImageSharp.Tests/TestUtilities/ImageProviders/TestImageProvider.cs @@ -1,4 +1,4 @@ -// Copyright (c) Six Labors and contributors. +// Copyright (c) Six Labors and contributors. // Licensed under the Apache License, Version 2.0. using System; @@ -36,7 +36,7 @@ namespace SixLabors.ImageSharp.Tests public Configuration Configuration { get; set; } = Configuration.CreateDefaultInstance(); /// - /// Utility instance to provide informations about the test image & manage input/output + /// Utility instance to provide information about the test image & manage input/output /// public ImagingTestCaseUtility Utility { get; private set; } @@ -132,7 +132,7 @@ namespace SixLabors.ImageSharp.Tests protected TestImageProvider Init( string typeName, string methodName, - string outputSubfolerName, + string outputSubfolderName, PixelTypes pixelTypeOverride) { if (pixelTypeOverride != PixelTypes.Undefined) @@ -141,7 +141,7 @@ namespace SixLabors.ImageSharp.Tests } this.TypeName = typeName; this.MethodName = methodName; - this.OutputSubfolderName = outputSubfolerName; + this.OutputSubfolderName = outputSubfolderName; this.Utility = new ImagingTestCaseUtility { @@ -151,7 +151,7 @@ namespace SixLabors.ImageSharp.Tests if (methodName != null) { - this.Utility.Init(typeName, methodName, outputSubfolerName); + this.Utility.Init(typeName, methodName, outputSubfolderName); } return this; @@ -170,4 +170,4 @@ namespace SixLabors.ImageSharp.Tests return $"{this.SourceFileOrDescription}[{this.PixelType}]"; } } -} \ No newline at end of file +} diff --git a/tests/ImageSharp.Tests/TestUtilities/ImageProviders/TestPatternProvider.cs b/tests/ImageSharp.Tests/TestUtilities/ImageProviders/TestPatternProvider.cs index f83112278..5694617c1 100644 --- a/tests/ImageSharp.Tests/TestUtilities/ImageProviders/TestPatternProvider.cs +++ b/tests/ImageSharp.Tests/TestUtilities/ImageProviders/TestPatternProvider.cs @@ -1,4 +1,4 @@ -// Copyright (c) Six Labors and contributors. +// Copyright (c) Six Labors and contributors. // Licensed under the Apache License, Version 2.0. using System; @@ -140,7 +140,7 @@ namespace SixLabors.ImageSharp.Tests } /// - /// Fills the bottom left quadrent with 3 horizental bars in Red, Green and Blue with a alpha gradient from left (transparent) to right (solid). + /// Fills the bottom left quadrant with 3 horizontal bars in Red, Green and Blue with a alpha gradient from left (transparent) to right (solid). /// /// private static void TransparentGradients(Buffer2D pixels) @@ -184,7 +184,7 @@ namespace SixLabors.ImageSharp.Tests } /// - /// Fills the bottom right quadrant with all the colors producable by converting itterating over a uint and unpacking it. + /// Fills the bottom right quadrant with all the colors producible by converting iterating over a uint and unpacking it. /// A better algorithm could be used but it works /// /// @@ -214,4 +214,4 @@ namespace SixLabors.ImageSharp.Tests } } } -} \ No newline at end of file +} diff --git a/tests/ImageSharp.Tests/TestUtilities/MeasureFixture.cs b/tests/ImageSharp.Tests/TestUtilities/MeasureFixture.cs index 6d06ec5e9..61bd7cd9f 100644 --- a/tests/ImageSharp.Tests/TestUtilities/MeasureFixture.cs +++ b/tests/ImageSharp.Tests/TestUtilities/MeasureFixture.cs @@ -1,4 +1,4 @@ -// Copyright (c) Six Labors and contributors. +// Copyright (c) Six Labors and contributors. // Licensed under the Apache License, Version 2.0. using System; @@ -14,7 +14,7 @@ namespace SixLabors.ImageSharp.Tests public class MeasureFixture { /// - /// Value indicating whether priniting is enabled. + /// Value indicating whether printing is enabled. /// protected bool EnablePrinting = true; @@ -79,4 +79,4 @@ namespace SixLabors.ImageSharp.Tests this.Output.WriteLine($"{this.operation} completed in {this.stopwatch.ElapsedMilliseconds}ms"); } } -} \ No newline at end of file +} diff --git a/tests/ImageSharp.Tests/TestUtilities/TestImageExtensions.cs b/tests/ImageSharp.Tests/TestUtilities/TestImageExtensions.cs index 1bd339656..91943d9a6 100644 --- a/tests/ImageSharp.Tests/TestUtilities/TestImageExtensions.cs +++ b/tests/ImageSharp.Tests/TestUtilities/TestImageExtensions.cs @@ -1,4 +1,4 @@ -// Copyright (c) Six Labors and contributors. +// Copyright (c) Six Labors and contributors. // Licensed under the Apache License, Version 2.0. using System; @@ -537,7 +537,7 @@ namespace SixLabors.ImageSharp.Tests /// Utility method for doing the following in one step: /// 1. Executing an operation (taken as a delegate) /// 2. Executing DebugSave() - /// 3. Executing CopareToReferenceOutput() + /// 3. Executing CompareToReferenceOutput() /// internal static void VerifyOperation( this TestImageProvider provider, @@ -570,7 +570,7 @@ namespace SixLabors.ImageSharp.Tests /// Utility method for doing the following in one step: /// 1. Executing an operation (taken as a delegate) /// 2. Executing DebugSave() - /// 3. Executing CopareToReferenceOutput() + /// 3. Executing CompareToReferenceOutput() /// internal static void VerifyOperation( this TestImageProvider provider, @@ -592,7 +592,7 @@ namespace SixLabors.ImageSharp.Tests /// Utility method for doing the following in one step: /// 1. Executing an operation (taken as a delegate) /// 2. Executing DebugSave() - /// 3. Executing CopareToReferenceOutput() + /// 3. Executing CompareToReferenceOutput() /// internal static void VerifyOperation( this TestImageProvider provider, @@ -614,7 +614,7 @@ namespace SixLabors.ImageSharp.Tests /// Utility method for doing the following in one step: /// 1. Executing an operation (taken as a delegate) /// 2. Executing DebugSave() - /// 3. Executing CopareToReferenceOutput() + /// 3. Executing CompareToReferenceOutput() /// internal static void VerifyOperation( this TestImageProvider provider, @@ -709,4 +709,4 @@ namespace SixLabors.ImageSharp.Tests } } } -} \ No newline at end of file +}