Browse Source

fix some spelling (#957)

* fix some spelling

* more typos

* more typos

* more typos

* more typos

* more typos

* linearSegment
af/merge-core
Simon Cropp 7 years ago
committed by James Jackson-South
parent
commit
aa6d2ab997
  1. 10
      src/ImageSharp.Drawing/Processing/Processors/Text/DrawTextProcessor{TPixel}.cs
  2. 2
      src/ImageSharp/Advanced/AdvancedImageExtensions.cs
  3. 6
      src/ImageSharp/Advanced/AotCompilerTools.cs
  4. 4
      src/ImageSharp/ColorSpaces/Conversion/ColorSpaceConverter.CieLab.cs
  5. 4
      src/ImageSharp/ColorSpaces/Conversion/ColorSpaceConverter.CieLuv.cs
  6. 14
      src/ImageSharp/ColorSpaces/Conversion/Implementation/RGBPrimariesChromaticityCoordinates.cs
  7. 2
      src/ImageSharp/Common/Exceptions/UnknownImageFormatException.cs
  8. 4
      src/ImageSharp/Formats/Gif/GifEncoderCore.cs
  9. 10
      src/ImageSharp/Formats/Gif/LzwEncoder.cs
  10. 2
      src/ImageSharp/Formats/IImageFormatDetector.cs
  11. 2
      src/ImageSharp/Formats/Jpeg/Components/Block8x8F.cs
  12. 2
      src/ImageSharp/IO/IFileSystem.cs
  13. 2
      src/ImageSharp/MetaData/Profiles/ICC/Enums/IccStandardObserver.cs
  14. 4
      src/ImageSharp/PixelFormats/PixelConversionModifiers.cs
  15. 4
      src/ImageSharp/Processing/KnownFilterMatrices.cs
  16. 6
      src/ImageSharp/Processing/KnownResamplers.cs
  17. 2
      src/ImageSharp/Processing/Processors/Convolution/BokehBlurProcessor.cs
  18. 4
      src/ImageSharp/Processing/Processors/Normalization/AdaptiveHistogramEqualizationProcessor{TPixel}.cs
  19. 4
      src/ImageSharp/Processing/Processors/Transforms/AffineTransformProcessor{TPixel}.cs
  20. 2
      src/ImageSharp/Processing/Processors/Transforms/ProjectiveTransformProcessor{TPixel}.cs
  21. 4
      tests/ImageSharp.Benchmarks/Drawing/FillPolygon.cs
  22. 6
      tests/ImageSharp.Benchmarks/Drawing/FillRectangle.cs
  23. 5
      tests/ImageSharp.Tests/Advanced/AdvancedImageExtensionsTests.cs
  24. 6
      tests/ImageSharp.Tests/Drawing/DrawPathTests.cs
  25. 4
      tests/ImageSharp.Tests/Drawing/FillRegionProcessorTests.cs
  26. 2
      tests/ImageSharp.Tests/Drawing/FillSolidBrushTests.cs
  27. 8
      tests/ImageSharp.Tests/Drawing/Paths/FillPolygon.cs
  28. 22
      tests/ImageSharp.Tests/Drawing/Text/DrawText.cs
  29. 4
      tests/ImageSharp.Tests/Formats/Gif/GifEncoderTests.cs
  30. 6
      tests/ImageSharp.Tests/Formats/Jpg/Block8x8FTests.cs
  31. 2
      tests/ImageSharp.Tests/Formats/Jpg/Utils/LibJpegTools.SpectralData.cs
  32. 8
      tests/ImageSharp.Tests/Formats/Jpg/Utils/ReferenceImplementations.LLM_FloatingPoint_DCT.cs
  33. 12
      tests/ImageSharp.Tests/Formats/Jpg/Utils/ReferenceImplementations.StandardIntegerDCT.cs
  34. 2
      tests/ImageSharp.Tests/Formats/Jpg/Utils/ReferenceImplementations.cs
  35. 8
      tests/ImageSharp.Tests/Image/ImageTests.Load_FromStream_ThrowsRightException.cs
  36. 10
      tests/ImageSharp.Tests/Memory/MemorySourceTests.cs
  37. 6
      tests/ImageSharp.Tests/MetaData/Profiles/ICC/DataReader/IccDataReader.PrimitivesTests.cs
  38. 2
      tests/ImageSharp.Tests/Numerics/RationalTests.cs
  39. 4
      tests/ImageSharp.Tests/Processing/Effects/OilPaintTest.cs
  40. 4
      tests/ImageSharp.Tests/TestFont.cs
  41. 18
      tests/ImageSharp.Tests/TestFormat.cs
  42. 12
      tests/ImageSharp.Tests/TestUtilities/TestMemoryAllocator.cs
  43. 4
      tests/ImageSharp.Tests/TestUtilities/Tests/ImageComparerTests.cs
  44. 10
      tests/ImageSharp.Tests/TestUtilities/Tests/ReferenceDecoderBenchmarks.cs

10
src/ImageSharp.Drawing/Processing/Processors/Text/DrawTextProcessor{TPixel}.cs

@ -191,7 +191,7 @@ namespace SixLabors.ImageSharp.Processing.Processors.Text
subPixelOffset.X = MathF.Round(subPixelOffset.X * AccuracyMultiple) / AccuracyMultiple;
subPixelOffset.Y = MathF.Round(subPixelOffset.Y * AccuracyMultiple) / AccuracyMultiple;
// we have offset our rendering origion a little bit down to prevent edge cropping, move the draw origin up to compensate
// we have offset our rendering origin a little bit down to prevent edge cropping, move the draw origin up to compensate
this.currentRenderPosition = new Point(this.currentRenderPosition.X - this.offset, this.currentRenderPosition.Y - this.offset);
this.currentGlyphRenderParams = (parameters, subPixelOffset);
@ -205,7 +205,7 @@ namespace SixLabors.ImageSharp.Processing.Processors.Text
// we check to see if we have a render cache and if we do then we render else
this.builder.Clear();
// ensure all glyphs render around [zero, zero] so offset negative root positions so when we draw the glyph we can offet it back
// ensure all glyphs render around [zero, zero] so offset negative root positions so when we draw the glyph we can offset it back
this.builder.SetOrigin(new PointF(-(int)bounds.X + this.offset, -(int)bounds.Y + this.offset));
this.rasterizationRequired = true;
@ -244,7 +244,7 @@ namespace SixLabors.ImageSharp.Processing.Processors.Text
{
GlyphRenderData renderData = default;
// has the glyoh been rendedered already????
// has the glyph been rendered already?
if (this.rasterizationRequired)
{
IPath path = this.builder.Build();
@ -303,7 +303,7 @@ namespace SixLabors.ImageSharp.Processing.Processors.Text
float offset = 0.5f;
if (this.Options.Antialias)
{
offset = 0f; // we are antialising skip offsetting as real antalising should take care of offset.
offset = 0f; // we are antialiasing skip offsetting as real antialiasing should take care of offset.
subpixelCount = this.Options.AntialiasSubpixelDepth;
if (subpixelCount < 4)
{
@ -443,4 +443,4 @@ namespace SixLabors.ImageSharp.Processing.Processors.Text
}
}
}
}
}

2
src/ImageSharp/Advanced/AdvancedImageExtensions.cs

@ -85,7 +85,7 @@ namespace SixLabors.ImageSharp.Advanced
/// <summary>
/// Returns a reference to the 0th element of the Pixel buffer,
/// allowing direct manipulation of pixel data through unsafe operations.
/// The pixel buffer is a contigous memory area containing Width*Height TPixel elements layed out in row-major order.
/// The pixel buffer is a contiguous memory area containing Width*Height TPixel elements laid out in row-major order.
/// </summary>
/// <typeparam name="TPixel">The Pixel format.</typeparam>
/// <param name="source">The source image</param>

6
src/ImageSharp/Advanced/AotCompilerTools.cs

@ -96,9 +96,9 @@ namespace SixLabors.ImageSharp.Advanced
/// <summary>
/// This method doesn't actually do anything but serves an important purpose...
/// If you are running ImageSharp on iOS and try to call SaveAsGif, it will throw an excepion:
/// If you are running ImageSharp on iOS and try to call SaveAsGif, it will throw an exception:
/// "Attempting to JIT compile method... OctreeFrameQuantizer.ConstructPalette... while running in aot-only mode."
/// The reason this happens is the SaveAsGif method makes haevy use of generics, which are too confusing for the AoT
/// The reason this happens is the SaveAsGif method makes heavy use of generics, which are too confusing for the AoT
/// compiler used on Xamarin.iOS. It spins up the JIT compiler to try and figure it out, but that is an illegal op on
/// iOS so it bombs out.
/// If you are getting the above error, you need to call this method, which will pre-seed the AoT compiler with the
@ -185,4 +185,4 @@ namespace SixLabors.ImageSharp.Advanced
genericResizeProcessor.AotCreateDestination(new Image<TPixel>(0, 0), default);
}
}
}
}

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

@ -25,7 +25,7 @@ namespace SixLabors.ImageSharp.ColorSpaces.Conversion
/// <returns>The <see cref="CieLab"/></returns>
public CieLab ToCieLab(in CieLch color)
{
// Conversion (perserving white point)
// Conversion (preserving white point)
CieLab unadapted = CieLchToCieLabConverter.Convert(color);
return this.Adapt(unadapted);
@ -446,4 +446,4 @@ namespace SixLabors.ImageSharp.ColorSpaces.Conversion
}
}
}
}
}

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

@ -87,7 +87,7 @@ namespace SixLabors.ImageSharp.ColorSpaces.Conversion
/// <returns>The <see cref="CieLab"/></returns>
public CieLuv ToCieLuv(in CieLchuv color)
{
// Conversion (perserving white point)
// Conversion (preserving white point)
CieLuv unadapted = CieLchuvToCieLuvConverter.Convert(color);
// Adaptation
@ -438,4 +438,4 @@ namespace SixLabors.ImageSharp.ColorSpaces.Conversion
}
}
}
}
}

14
src/ImageSharp/ColorSpaces/Conversion/Implementation/RGBPrimariesChromaticityCoordinates.cs

@ -14,9 +14,9 @@ namespace SixLabors.ImageSharp.ColorSpaces.Conversion.Implementation
/// <summary>
/// Initializes a new instance of the <see cref="RgbPrimariesChromaticityCoordinates"/> struct.
/// </summary>
/// <param name="r">The chomaticity coordinates of the red channel.</param>
/// <param name="g">The chomaticity coordinates of the green channel.</param>
/// <param name="b">The chomaticity coordinates of the blue channel.</param>
/// <param name="r">The chromaticity coordinates of the red channel.</param>
/// <param name="g">The chromaticity coordinates of the green channel.</param>
/// <param name="b">The chromaticity coordinates of the blue channel.</param>
public RgbPrimariesChromaticityCoordinates(CieXyChromaticityCoordinates r, CieXyChromaticityCoordinates g, CieXyChromaticityCoordinates b)
{
this.R = r;
@ -25,17 +25,17 @@ namespace SixLabors.ImageSharp.ColorSpaces.Conversion.Implementation
}
/// <summary>
/// Gets the chomaticity coordinates of the red channel.
/// Gets the chromaticity coordinates of the red channel.
/// </summary>
public CieXyChromaticityCoordinates R { get; }
/// <summary>
/// Gets the chomaticity coordinates of the green channel.
/// Gets the chromaticity coordinates of the green channel.
/// </summary>
public CieXyChromaticityCoordinates G { get; }
/// <summary>
/// Gets the chomaticity coordinates of the blue channel.
/// Gets the chromaticity coordinates of the blue channel.
/// </summary>
public CieXyChromaticityCoordinates B { get; }
@ -88,4 +88,4 @@ namespace SixLabors.ImageSharp.ColorSpaces.Conversion.Implementation
/// <inheritdoc />
public override int GetHashCode() => HashCode.Combine(this.R, this.G, this.B);
}
}
}

2
src/ImageSharp/Common/Exceptions/UnknownImageFormatException.cs

@ -7,7 +7,7 @@ namespace SixLabors.ImageSharp
{
/// <summary>
/// The exception that is thrown when the library tries to load
/// an image which has an unkown format.
/// an image which has an unknown format.
/// </summary>
public sealed class UnknownImageFormatException : ImageFormatException
{

4
src/ImageSharp/Formats/Gif/GifEncoderCore.cs

@ -147,10 +147,10 @@ namespace SixLabors.ImageSharp.Formats.Gif
}
else
{
using (IFrameQuantizer<TPixel> palleteFrameQuantizer =
using (IFrameQuantizer<TPixel> paletteFrameQuantizer =
new PaletteFrameQuantizer<TPixel>(this.quantizer.Diffuser, quantized.Palette))
{
using (IQuantizedFrame<TPixel> paletteQuantized = palleteFrameQuantizer.QuantizeFrame(frame))
using (IQuantizedFrame<TPixel> paletteQuantized = paletteFrameQuantizer.QuantizeFrame(frame))
{
this.WriteImageData(paletteQuantized, stream);
}

10
src/ImageSharp/Formats/Gif/LzwEncoder.cs

@ -249,9 +249,9 @@ namespace SixLabors.ImageSharp.Formats.Gif
/// Compress the packets to the stream.
/// </summary>
/// <param name="indexedPixels">The span of indexed pixels.</param>
/// <param name="intialBits">The initial bits.</param>
/// <param name="initialBits">The initial bits.</param>
/// <param name="stream">The stream to write to.</param>
private void Compress(ReadOnlySpan<byte> indexedPixels, int intialBits, Stream stream)
private void Compress(ReadOnlySpan<byte> indexedPixels, int initialBits, Stream stream)
{
int fcode;
int c;
@ -260,14 +260,14 @@ namespace SixLabors.ImageSharp.Formats.Gif
int hshift;
// Set up the globals: globalInitialBits - initial number of bits
this.globalInitialBits = intialBits;
this.globalInitialBits = initialBits;
// Set up the necessary values
this.clearFlag = false;
this.bitCount = this.globalInitialBits;
this.maxCode = GetMaxcode(this.bitCount);
this.clearCode = 1 << (intialBits - 1);
this.clearCode = 1 << (initialBits - 1);
this.eofCode = this.clearCode + 1;
this.freeEntry = this.clearCode + 2;
@ -450,4 +450,4 @@ namespace SixLabors.ImageSharp.Formats.Gif
this.codeTable?.Dispose();
}
}
}
}

2
src/ImageSharp/Formats/IImageFormatDetector.cs

@ -20,7 +20,7 @@ namespace SixLabors.ImageSharp.Formats
/// Detect mimetype
/// </summary>
/// <param name="header">The <see cref="T:byte[]"/> containing the file header.</param>
/// <returns>returns the mime type of detected othersie returns null</returns>
/// <returns>returns the mime type of detected otherwise returns null</returns>
IImageFormat DetectFormat(ReadOnlySpan<byte> header);
}
}

2
src/ImageSharp/Formats/Jpeg/Components/Block8x8F.cs

@ -210,7 +210,7 @@ namespace SixLabors.ImageSharp.Formats.Jpeg.Components
}
/// <summary>
/// Convert salars to byte-s and copy to dest,
/// Convert scalars to byte-s and copy to dest,
/// </summary>
/// <param name="blockPtr">Pointer to block</param>
/// <param name="dest">Destination</param>

2
src/ImageSharp/IO/IFileSystem.cs

@ -18,7 +18,7 @@ namespace SixLabors.ImageSharp.IO
Stream OpenRead(string path);
/// <summary>
/// Creates or opens a file and returns it as a writeable stream as defined by the path.
/// Creates or opens a file and returns it as a writable stream as defined by the path.
/// </summary>
/// <param name="path">Path to the file to open.</param>
/// <returns>A stream representing the file to open.</returns>

2
src/ImageSharp/MetaData/Profiles/ICC/Enums/IccStandardObserver.cs

@ -11,7 +11,7 @@ namespace SixLabors.ImageSharp.Metadata.Profiles.Icc
/// <summary>
/// Unknown observer
/// </summary>
Unkown = 0,
Unknown = 0,
/// <summary>
/// CIE 1931 observer

4
src/ImageSharp/PixelFormats/PixelConversionModifiers.cs

@ -8,7 +8,7 @@ using SixLabors.ImageSharp.ColorSpaces.Companding;
namespace SixLabors.ImageSharp.PixelFormats
{
/// <summary>
/// Flags responsible to select additional operations which could be effitiently applied in
/// Flags responsible to select additional operations which could be efficiently applied in
/// <see cref="PixelOperations{TPixel}.ToVector4(SixLabors.ImageSharp.Configuration,System.ReadOnlySpan{TPixel},System.Span{System.Numerics.Vector4},SixLabors.ImageSharp.PixelFormats.PixelConversionModifiers)"/>
/// or
/// <see cref="PixelOperations{TPixel}.FromVector4Destructive(SixLabors.ImageSharp.Configuration,System.Span{System.Numerics.Vector4},System.Span{TPixel},SixLabors.ImageSharp.PixelFormats.PixelConversionModifiers)"/>
@ -37,4 +37,4 @@ namespace SixLabors.ImageSharp.PixelFormats
/// </summary>
SRgbCompand = 1 << 2,
}
}
}

4
src/ImageSharp/Processing/KnownFilterMatrices.cs

@ -4,7 +4,7 @@
using System;
using SixLabors.ImageSharp.Primitives;
// Many of these matrices are tranlated from Chromium project where
// Many of these matrices are translated from Chromium project where
// SkScalar[] is memory-mapped to a row-major matrix.
// The following translates to our column-major form:
//
@ -461,4 +461,4 @@ namespace SixLabors.ImageSharp.Processing
};
}
}
}
}

6
src/ImageSharp/Processing/KnownResamplers.cs

@ -70,12 +70,12 @@ namespace SixLabors.ImageSharp.Processing
/// <summary>
/// Gets the Robidoux sampler. This algorithm developed by Nicolas Robidoux providing a very good equilibrium between
/// detail preservation (sharpness) and smoothness comprable to <see cref="MitchellNetravali"/>.
/// detail preservation (sharpness) and smoothness comparable to <see cref="MitchellNetravali"/>.
/// </summary>
public static IResampler Robidoux { get; } = new RobidouxResampler();
/// <summary>
/// Gets the Robidoux Sharp sampler. A sharpend form of the <see cref="Robidoux"/> sampler
/// Gets the Robidoux Sharp sampler. A sharpened form of the <see cref="Robidoux"/> sampler
/// </summary>
public static IResampler RobidouxSharp { get; } = new RobidouxSharpResampler();
@ -91,7 +91,7 @@ namespace SixLabors.ImageSharp.Processing
public static IResampler Triangle { get; } = new TriangleResampler();
/// <summary>
/// Gets the Welch sampler. A high speed algorthm that delivers very sharpened results.
/// Gets the Welch sampler. A high speed algorithm that delivers very sharpened results.
/// </summary>
public static IResampler Welch { get; } = new WelchResampler();
}

2
src/ImageSharp/Processing/Processors/Convolution/BokehBlurProcessor.cs

@ -107,7 +107,7 @@ namespace SixLabors.ImageSharp.Processing.Processors.Convolution
public float Gamma { get; }
/// <summary>
/// Gets the exection mode to use when applying the effect.
/// Gets the execution mode to use when applying the effect.
/// </summary>
public BokehBlurExecutionMode ExecutionMode { get; }

4
src/ImageSharp/Processing/Processors/Normalization/AdaptiveHistogramEqualizationProcessor{TPixel}.cs

@ -498,8 +498,8 @@ namespace SixLabors.ImageSharp.Processing.Processors.Normalization
int dyOffset = dy * sourceWidth;
for (int dx = x; dx < xlimit; dx++)
{
int luminace = GetLuminance(Unsafe.Add(ref sourceBase, dyOffset + dx), luminanceLevels);
histogram[luminace]++;
int luminance = GetLuminance(Unsafe.Add(ref sourceBase, dyOffset + dx), luminanceLevels);
histogram[luminance]++;
}
}

4
src/ImageSharp/Processing/Processors/Transforms/AffineTransformProcessor{TPixel}.cs

@ -49,7 +49,7 @@ namespace SixLabors.ImageSharp.Processing.Processors.Transforms
Rectangle sourceRectangle,
Configuration configuration)
{
// Handle tranforms that result in output identical to the original.
// Handle transforms that result in output identical to the original.
if (this.TransformMatrix.Equals(default) || this.TransformMatrix.Equals(Matrix3x2.Identity))
{
// The clone will be blank here copy all the pixel data over
@ -133,4 +133,4 @@ namespace SixLabors.ImageSharp.Processing.Processors.Transforms
}
}
}
}
}

2
src/ImageSharp/Processing/Processors/Transforms/ProjectiveTransformProcessor{TPixel}.cs

@ -53,7 +53,7 @@ namespace SixLabors.ImageSharp.Processing.Processors.Transforms
{
Matrix4x4 transformMatrix = this.definition.TransformMatrix;
// Handle tranforms that result in output identical to the original.
// Handle transforms that result in output identical to the original.
if (transformMatrix.Equals(default) || transformMatrix.Equals(Matrix4x4.Identity))
{
// The clone will be blank here copy all the pixel data over

4
tests/ImageSharp.Benchmarks/Drawing/FillPolygon.cs

@ -68,7 +68,7 @@ namespace SixLabors.ImageSharp.Benchmarks
}
[Benchmark(Description = "ImageSharp Fill Polygon - cached shape")]
public void DrawSolidPolygonCoreCahced()
public void DrawSolidPolygonCoreCached()
{
using (var image = new Image<Rgba32>(800, 800))
{
@ -83,4 +83,4 @@ namespace SixLabors.ImageSharp.Benchmarks
}
}
}
}
}

6
tests/ImageSharp.Benchmarks/Drawing/FillRectangle.cs

@ -24,13 +24,13 @@ namespace SixLabors.ImageSharp.Benchmarks
graphics.InterpolationMode = InterpolationMode.Default;
graphics.SmoothingMode = SmoothingMode.AntiAlias;
graphics.FillRectangle(System.Drawing.Brushes.HotPink, new Rectangle(10, 10, 190, 140));
return destination.Size;
}
}
[Benchmark(Description = "ImageSharp Fill Rectangle")]
public CoreSize FillRactangleCore()
public CoreSize FillRectangleCore()
{
using (var image = new Image<Rgba32>(800, 800))
{
@ -57,4 +57,4 @@ namespace SixLabors.ImageSharp.Benchmarks
}
}
}
}
}

5
tests/ImageSharp.Tests/Advanced/AdvancedImageExtensionsTests.cs

@ -1,4 +1,5 @@
// Copyright (c) Six Labors and contributors.
// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
using System;
@ -55,9 +56,9 @@ namespace SixLabors.ImageSharp.Tests.Advanced
var targetBuffer = new TPixel[image0.Width * image0.Height];
image0.GetPixelSpan().CopyTo(targetBuffer);
var managerOfExeternalMemory = new TestMemoryManager<TPixel>(targetBuffer);
var managerOfExternalMemory = new TestMemoryManager<TPixel>(targetBuffer);
Memory<TPixel> externalMemory = managerOfExeternalMemory.Memory;
Memory<TPixel> externalMemory = managerOfExternalMemory.Memory;
using (var image1 = Image.WrapMemory(externalMemory, image0.Width, image0.Height))
{

6
tests/ImageSharp.Tests/Drawing/DrawPathTests.cs

@ -30,17 +30,17 @@ namespace SixLabors.ImageSharp.Tests.Drawing
public void DrawPath<TPixel>(TestImageProvider<TPixel> provider, string colorName, byte alpha, float thickness)
where TPixel : struct, IPixel<TPixel>
{
var linerSegemnt = new LinearLineSegment(
var linearSegment = new LinearLineSegment(
new Vector2(10, 10),
new Vector2(200, 150),
new Vector2(50, 300));
var bazierSegment = new CubicBezierLineSegment(
var bezierSegment = new CubicBezierLineSegment(
new Vector2(50, 300),
new Vector2(500, 500),
new Vector2(60, 10),
new Vector2(10, 400));
var path = new Path(linerSegemnt, bazierSegment);
var path = new Path(linearSegment, bezierSegment);
Rgba32 rgba = TestUtils.GetColorByName(colorName);
rgba.A = alpha;

4
tests/ImageSharp.Tests/Drawing/FillRegionProcessorTests.cs

@ -19,14 +19,14 @@ namespace SixLabors.ImageSharp.Tests.Drawing
public class FillRegionProcessorTests
{
[Theory]
[InlineData(true, 1, 4)]
[InlineData(true, 2, 4)]
[InlineData(true, 5, 5)]
[InlineData(true, 8, 8)]
[InlineData(false, 8, 4)]
[InlineData(false, 16, 4)] // we always do 4 sub=pixels when antialising is off.
[InlineData(false, 16, 4)] // we always do 4 sub=pixels when antialiasing is off.
public void MinimumAntialiasSubpixelDepth(bool antialias, int antialiasSubpixelDepth, int expectedAntialiasSubpixelDepth)
{
var bounds = new Rectangle(0, 0, 1, 1);

2
tests/ImageSharp.Tests/Drawing/FillSolidBrushTests.cs

@ -141,7 +141,7 @@ namespace SixLabors.ImageSharp.Tests.Drawing
[Theory]
[WithSolidFilledImages(nameof(BlendData), 16, 16, "Red", PixelTypes.Rgba32)]
public void BlendFillColorOverBackround<TPixel>(
public void BlendFillColorOverBackground<TPixel>(
TestImageProvider<TPixel> provider,
bool triggerFillRegion,
string newColorName,

8
tests/ImageSharp.Tests/Drawing/Paths/FillPolygon.cs

@ -35,7 +35,7 @@ namespace SixLabors.ImageSharp.Tests.Drawing.Paths
ShapeRegion region = Assert.IsType<ShapeRegion>(processor.Region);
Polygon polygon = Assert.IsType<Polygon>(region.Shape);
LinearLineSegment segemnt = Assert.IsType<LinearLineSegment>(polygon.LineSegments[0]);
LinearLineSegment segment = Assert.IsType<LinearLineSegment>(polygon.LineSegments[0]);
Assert.Equal(this.brush, processor.Brush);
}
@ -50,7 +50,7 @@ namespace SixLabors.ImageSharp.Tests.Drawing.Paths
ShapeRegion region = Assert.IsType<ShapeRegion>(processor.Region);
Polygon polygon = Assert.IsType<Polygon>(region.Shape);
LinearLineSegment segemnt = Assert.IsType<LinearLineSegment>(polygon.LineSegments[0]);
LinearLineSegment segment = Assert.IsType<LinearLineSegment>(polygon.LineSegments[0]);
Assert.Equal(this.brush, processor.Brush);
}
@ -66,7 +66,7 @@ namespace SixLabors.ImageSharp.Tests.Drawing.Paths
ShapeRegion region = Assert.IsType<ShapeRegion>(processor.Region);
Polygon polygon = Assert.IsType<Polygon>(region.Shape);
LinearLineSegment segemnt = Assert.IsType<LinearLineSegment>(polygon.LineSegments[0]);
LinearLineSegment segment = Assert.IsType<LinearLineSegment>(polygon.LineSegments[0]);
SolidBrush brush = Assert.IsType<SolidBrush>(processor.Brush);
Assert.Equal(this.color, brush.Color);
@ -82,7 +82,7 @@ namespace SixLabors.ImageSharp.Tests.Drawing.Paths
ShapeRegion region = Assert.IsType<ShapeRegion>(processor.Region);
Polygon polygon = Assert.IsType<Polygon>(region.Shape);
LinearLineSegment segemnt = Assert.IsType<LinearLineSegment>(polygon.LineSegments[0]);
LinearLineSegment segment = Assert.IsType<LinearLineSegment>(polygon.LineSegments[0]);
SolidBrush brush = Assert.IsType<SolidBrush>(processor.Brush);
Assert.Equal(this.color, brush.Color);

22
tests/ImageSharp.Tests/Drawing/Text/DrawText.cs

@ -33,7 +33,7 @@ namespace SixLabors.ImageSharp.Tests.Drawing.Text
}
[Fact]
public void FillsForEachACharachterWhenBrushSetAndNotPen()
public void FillsForEachACharacterWhenBrushSetAndNotPen()
{
this.operations.DrawText(
new TextGraphicsOptions(true),
@ -47,7 +47,7 @@ namespace SixLabors.ImageSharp.Tests.Drawing.Text
}
[Fact]
public void FillsForEachACharachterWhenBrushSetAndNotPenDefaultOptions()
public void FillsForEachACharacterWhenBrushSetAndNotPenDefaultOptions()
{
this.operations.DrawText("123", this.Font, Brushes.Solid(Color.Red), null, Vector2.Zero);
@ -55,7 +55,7 @@ namespace SixLabors.ImageSharp.Tests.Drawing.Text
}
[Fact]
public void FillsForEachACharachterWhenBrushSet()
public void FillsForEachACharacterWhenBrushSet()
{
this.operations.DrawText(new TextGraphicsOptions(true), "123", this.Font, Brushes.Solid(Color.Red), Vector2.Zero);
@ -63,7 +63,7 @@ namespace SixLabors.ImageSharp.Tests.Drawing.Text
}
[Fact]
public void FillsForEachACharachterWhenBrushSetDefaultOptions()
public void FillsForEachACharacterWhenBrushSetDefaultOptions()
{
this.operations.DrawText("123", this.Font, Brushes.Solid(Color.Red), Vector2.Zero);
@ -71,7 +71,7 @@ namespace SixLabors.ImageSharp.Tests.Drawing.Text
}
[Fact]
public void FillsForEachACharachterWhenColorSet()
public void FillsForEachACharacterWhenColorSet()
{
this.operations.DrawText(new TextGraphicsOptions(true), "123", this.Font, Color.Red, Vector2.Zero);
@ -82,7 +82,7 @@ namespace SixLabors.ImageSharp.Tests.Drawing.Text
}
[Fact]
public void FillsForEachACharachterWhenColorSetDefaultOptions()
public void FillsForEachACharacterWhenColorSetDefaultOptions()
{
this.operations.DrawText("123", this.Font, Color.Red, Vector2.Zero);
@ -93,7 +93,7 @@ namespace SixLabors.ImageSharp.Tests.Drawing.Text
}
[Fact]
public void DrawForEachACharachterWhenPenSetAndNotBrush()
public void DrawForEachACharacterWhenPenSetAndNotBrush()
{
this.operations.DrawText(
new TextGraphicsOptions(true),
@ -107,7 +107,7 @@ namespace SixLabors.ImageSharp.Tests.Drawing.Text
}
[Fact]
public void DrawForEachACharachterWhenPenSetAndNotBrushDefaultOptions()
public void DrawForEachACharacterWhenPenSetAndNotBrushDefaultOptions()
{
this.operations.DrawText("123", this.Font, null, Pens.Dash(Color.Red, 1), Vector2.Zero);
@ -115,7 +115,7 @@ namespace SixLabors.ImageSharp.Tests.Drawing.Text
}
[Fact]
public void DrawForEachACharachterWhenPenSet()
public void DrawForEachACharacterWhenPenSet()
{
this.operations.DrawText(new TextGraphicsOptions(true), "123", this.Font, Pens.Dash(Color.Red, 1), Vector2.Zero);
@ -123,7 +123,7 @@ namespace SixLabors.ImageSharp.Tests.Drawing.Text
}
[Fact]
public void DrawForEachACharachterWhenPenSetDefaultOptions()
public void DrawForEachACharacterWhenPenSetDefaultOptions()
{
this.operations.DrawText("123", this.Font, Pens.Dash(Color.Red, 1), Vector2.Zero);
@ -138,7 +138,7 @@ namespace SixLabors.ImageSharp.Tests.Drawing.Text
}
[Fact]
public void DrawForEachACharachterWhenPenSetAndFillFroEachWhenBrushSet()
public void DrawForEachACharacterWhenPenSetAndFillFroEachWhenBrushSet()
{
this.operations.DrawText(
new TextGraphicsOptions(true),

4
tests/ImageSharp.Tests/Formats/Gif/GifEncoderTests.cs

@ -34,8 +34,8 @@ namespace SixLabors.ImageSharp.Tests.Formats.Gif
{
var encoder = new GifEncoder()
{
// Use the palette quantizer without dithering to ensure results
// are consistant
// Use the palette quantizer without dithering to ensure results
// are consistent
Quantizer = new WebSafePaletteQuantizer(false)
};

6
tests/ImageSharp.Tests/Formats/Jpg/Block8x8FTests.cs

@ -186,13 +186,13 @@ namespace SixLabors.ImageSharp.Tests.Formats.Jpg
}
[Fact]
public void TranposeInto_Benchmark()
public void TransposeInto_Benchmark()
{
var source = new BufferHolder();
source.Buffer.LoadFrom(Create8x8FloatData());
var dest = new BufferHolder();
this.Output.WriteLine($"TranposeInto_PinningImpl_Benchmark X {Times} ...");
this.Output.WriteLine($"TransposeInto_PinningImpl_Benchmark X {Times} ...");
var sw = Stopwatch.StartNew();
for (int i = 0; i < Times; i++)
@ -201,7 +201,7 @@ namespace SixLabors.ImageSharp.Tests.Formats.Jpg
}
sw.Stop();
this.Output.WriteLine($"TranposeInto_PinningImpl_Benchmark finished in {sw.ElapsedMilliseconds} ms");
this.Output.WriteLine($"TransposeInto_PinningImpl_Benchmark finished in {sw.ElapsedMilliseconds} ms");
}
private static float[] Create8x8ColorCropTestData()

2
tests/ImageSharp.Tests/Formats/Jpg/Utils/LibJpegTools.SpectralData.cs

@ -16,7 +16,7 @@ namespace SixLabors.ImageSharp.Tests.Formats.Jpg.Utils
internal static partial class LibJpegTools
{
/// <summary>
/// Stores spectral jpeg compoent data in libjpeg-compatible style.
/// Stores spectral jpeg component data in libjpeg-compatible style.
/// </summary>
public class SpectralData : IEquatable<SpectralData>
{

8
tests/ImageSharp.Tests/Formats/Jpg/Utils/ReferenceImplementations.LLM_FloatingPoint_DCT.cs

@ -14,14 +14,14 @@ namespace SixLabors.ImageSharp.Tests.Formats.Jpg.Utils
/// <summary>
/// Contains port of non-optimized methods in:
/// https://github.com/norishigefukushima/dct_simd/blob/master/dct/dct8x8_simd.cpp
///
///
/// *** Paper ***
/// paper LLM89
/// C. Loeffler, A. Ligtenberg, and G. S. Moschytz,
/// C. Loeffler, A. Ligtenberg, and G. S. Moschytz,
/// "Practical fast 1-D DCT algorithms with 11 multiplications,"
/// Proc. Int'l. Conf. on Acoustics, Speech, and Signal Processing (ICASSP89), pp. 988-991, 1989.
///
/// The main purpose of this code is testing and documentation, it is intented to be similar to it's original counterpart.
///
/// The main purpose of this code is testing and documentation, it is intended to be similar to it's original counterpart.
/// DO NOT clean it!
/// DO NOT StyleCop it!
/// </summary>

12
tests/ImageSharp.Tests/Formats/Jpg/Utils/ReferenceImplementations.StandardIntegerDCT.cs

@ -9,18 +9,18 @@ namespace SixLabors.ImageSharp.Tests.Formats.Jpg.Utils
{
/// <summary>
/// TODO: produces really bad results for bigger values!
///
///
/// Contains the "original" golang based DCT/IDCT implementations as reference implementations.
/// 1. ===== Forward DCT =====
/// **** The original golang source claims:
/// It is based on the code in jfdctint.c from the Independent JPEG Group,
/// found at http://www.ijg.org/files/jpegsrc.v8c.tar.gz.
///
///
/// **** Could be found here as well:
/// https://github.com/mozilla/mozjpeg/blob/master/jfdctint.c
///
/// https://github.com/mozilla/mozjpeg/blob/master/jfdctint.c
///
/// 2. ===== Inverse DCT =====
///
///
/// The golang source claims:
/// http://standards.iso.org/ittf/PubliclyAvailableStandards/ISO_IEC_13818-4_2004_Conformance_Testing/Video/verifier/mpeg2decode_960109.tar.gz
/// The referenced MPEG2 code claims:
@ -34,7 +34,7 @@ namespace SixLabors.ImageSharp.Tests.Formats.Jpg.Utils
/// /* coefficients extended to 12 bit for IEEE1180-1990 */
/// /* compliance sE, 2.1.94 */
/// /**********************************************************/
///
///
/// **** The code looks pretty similar to the standard libjpeg IDCT, but without quantization:
/// https://github.com/mozilla/mozjpeg/blob/master/jidctint.c
/// </summary>

2
tests/ImageSharp.Tests/Formats/Jpg/Utils/ReferenceImplementations.cs

@ -131,7 +131,7 @@ namespace SixLabors.ImageSharp.Tests.Formats.Jpg.Utils
/// Rounds a rational number defined as dividend/divisor into an integer
/// </summary>
/// <param name="dividend">The dividend</param>
/// <param name="divisor">The divisior</param>
/// <param name="divisor">The divisor</param>
/// <returns></returns>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
private static int RationalRound(int dividend, int divisor)

8
tests/ImageSharp.Tests/Image/ImageTests.Load_FromStream_ThrowsRightException.cs

@ -18,11 +18,11 @@ namespace SixLabors.ImageSharp.Tests
public class Load_FromStream_Throws : IDisposable
{
private static readonly byte[] Data = new byte[] { 0x01 };
private MemoryStream Stream { get; } = new MemoryStream(Data);
[Fact]
public void Image_Load_Throws_UknownImageFormatException()
public void Image_Load_Throws_UnknownImageFormatException()
{
Assert.Throws<UnknownImageFormatException>(() =>
{
@ -33,7 +33,7 @@ namespace SixLabors.ImageSharp.Tests
}
[Fact]
public void Image_Load_T_Throws_UknownImageFormatException()
public void Image_Load_T_Throws_UnknownImageFormatException()
{
Assert.Throws<UnknownImageFormatException>(() =>
{

10
tests/ImageSharp.Tests/Memory/MemorySourceTests.cs

@ -49,11 +49,11 @@ namespace SixLabors.ImageSharp.Tests.Memory
[Theory]
[InlineData(false)]
[InlineData(true)]
public void WhenOwnershipIsTransfered_ShouldDisposeMemoryOwner(bool isInternalMemorySource)
public void WhenOwnershipIsTransferred_ShouldDisposeMemoryOwner(bool isInternalMemorySource)
{
var mmg = new TestMemoryManager<int>(new int[10]);
var bmg = new MemorySource<int>(mmg, isInternalMemorySource);
bmg.Dispose();
Assert.True(mmg.IsDisposed);
}
@ -68,7 +68,7 @@ namespace SixLabors.ImageSharp.Tests.Memory
Assert.False(mmg.IsDisposed);
}
}
public class SwapOrCopyContent
{
private MemoryAllocator MemoryAllocator { get; } = new TestMemoryAllocator();
@ -119,7 +119,7 @@ namespace SixLabors.ImageSharp.Tests.Memory
MemorySource<Rgba32> source = sourceIsOwner
? new MemorySource<Rgba32>(sourceOwner, isInternalMemorySource)
: new MemorySource<Rgba32>(sourceOwner.Memory);
sourceOwner.Memory.Span[10] = color;
// Act:
@ -153,7 +153,7 @@ namespace SixLabors.ImageSharp.Tests.Memory
Assert.ThrowsAny<InvalidOperationException>(
() => MemorySource<Rgba32>.SwapOrCopyContent(ref dest, ref source)
);
Assert.Equal(color, source.Memory.Span[10]);
Assert.NotEqual(color, dest.Memory.Span[10]);
}

6
tests/ImageSharp.Tests/MetaData/Profiles/ICC/DataReader/IccDataReader.PrimitivesTests.cs

@ -8,7 +8,7 @@ using Xunit;
namespace SixLabors.ImageSharp.Tests.Icc
{
public class IccDataReaderPrimitivesTests
{
{
[Theory]
[MemberData(nameof(IccTestDataPrimitives.AsciiTestData), MemberType = typeof(IccTestDataPrimitives))]
public void ReadAsciiString(byte[] textBytes, int length, string expected)
@ -21,7 +21,7 @@ namespace SixLabors.ImageSharp.Tests.Icc
}
[Fact]
public void ReadAsciiStringWithNegativeLenghtThrowsArgumentException()
public void ReadAsciiStringWithNegativeLengthThrowsArgumentException()
{
IccDataReader reader = CreateReader(new byte[4]);
@ -29,7 +29,7 @@ namespace SixLabors.ImageSharp.Tests.Icc
}
[Fact]
public void ReadUnicodeStringWithNegativeLenghtThrowsArgumentException()
public void ReadUnicodeStringWithNegativeLengthThrowsArgumentException()
{
IccDataReader reader = CreateReader(new byte[4]);

2
tests/ImageSharp.Tests/Numerics/RationalTests.cs

@ -91,7 +91,7 @@ namespace SixLabors.ImageSharp.Tests
}
[Fact]
public void ToStringRepresention()
public void ToStringRepresentation()
{
var rational = new Rational(0, 0);
Assert.Equal("[ Indeterminate ]", rational.ToString());

4
tests/ImageSharp.Tests/Processing/Effects/OilPaintTest.cs

@ -30,7 +30,7 @@ namespace SixLabors.ImageSharp.Tests.Processing.Effects
Assert.Equal(15, processor.BrushSize);
}
[Fact]
public void OilPaint_Levels_Brsuh_OilPaintingProcessorDefaultsSet()
public void OilPaint_Levels_Brush_OilPaintingProcessorDefaultsSet()
{
this.operations.OilPaint(34, 65);
var processor = this.Verify<OilPaintingProcessor>();
@ -40,7 +40,7 @@ namespace SixLabors.ImageSharp.Tests.Processing.Effects
}
[Fact]
public void OilPaint_Levels_Brsuh_rect_OilPaintingProcessorDefaultsSet()
public void OilPaint_Levels_Brush_rect_OilPaintingProcessorDefaultsSet()
{
this.operations.OilPaint(54, 43, this.rect);
var processor = this.Verify<OilPaintingProcessor>(this.rect);

4
tests/ImageSharp.Tests/TestFont.cs

@ -52,7 +52,7 @@ namespace SixLabors.ImageSharp.Tests
Path.GetFullPath(x)
}).ToList();
AddFormatsDirectoryFromTestAssebmlyPath(directories);
AddFormatsDirectoryFromTestAssemblyPath(directories);
string directory = directories.FirstOrDefault(x => Directory.Exists(x));
@ -70,7 +70,7 @@ namespace SixLabors.ImageSharp.Tests
/// This method calculates and adds the format directory based on the ImageSharp.Tests assembly location.
/// </summary>
/// <param name="directories">The directories list</param>
private static void AddFormatsDirectoryFromTestAssebmlyPath(List<string> directories)
private static void AddFormatsDirectoryFromTestAssemblyPath(List<string> directories)
{
string assemblyLocation = typeof(TestFile).GetTypeInfo().Assembly.Location;
assemblyLocation = Path.GetDirectoryName(assemblyLocation);

18
tests/ImageSharp.Tests/TestFormat.cs

@ -20,7 +20,7 @@ namespace SixLabors.ImageSharp.Tests
public class TestFormat : IConfigurationModule, IImageFormat
{
private readonly Dictionary<Type, object> sampleImages = new Dictionary<Type, object>();
// We should not change Configuration.Default in individual tests!
// Create new configuration instances with new Configuration(TestFormat.GlobalTestFormat) instead!
public static TestFormat GlobalTestFormat { get; } = new TestFormat();
@ -58,20 +58,20 @@ namespace SixLabors.ImageSharp.Tests
DecodeOperation[] discovered = this.DecodeCalls.Where(x => x.IsMatch(marker, config, typeof(TPixel))).ToArray();
Assert.True(discovered.Any(), "No calls to decode on this formate with the proveded options happend");
Assert.True(discovered.Any(), "No calls to decode on this format with the provided options happened");
foreach (DecodeOperation d in discovered)
{
this.DecodeCalls.Remove(d);
}
}
public void VerifyAgnosticDecodeCall(byte[] marker, Configuration config)
{
DecodeOperation[] discovered = this.DecodeCalls.Where(x => x.IsMatch(marker, config, typeof(TestPixelForAgnosticDecode))).ToArray();
Assert.True(discovered.Any(), "No calls to decode on this formate with the proveded options happend");
Assert.True(discovered.Any(), "No calls to decode on this format with the provided options happened");
foreach (DecodeOperation d in discovered)
{
@ -139,7 +139,7 @@ namespace SixLabors.ImageSharp.Tests
public byte[] marker;
internal Configuration config;
public Type pixelType;
public Type pixelType;
public bool IsMatch(byte[] testMarker, Configuration config, Type pixelType)
{
@ -218,7 +218,7 @@ namespace SixLabors.ImageSharp.Tests
}
public bool IsSupportedFileFormat(Span<byte> header) => testFormat.IsSupportedFileFormat(header);
public Image Decode(Configuration configuration, Stream stream) => this.Decode<TestPixelForAgnosticDecode>(configuration, stream);
}
@ -237,11 +237,11 @@ namespace SixLabors.ImageSharp.Tests
public void Encode<TPixel>(Image<TPixel> image, Stream stream) where TPixel : struct, IPixel<TPixel>
{
// TODO record this happend so we can verify it.
// TODO record this happened so we can verify it.
}
}
struct TestPixelForAgnosticDecode : IPixel<TestPixelForAgnosticDecode>
{
public PixelOperations<TestPixelForAgnosticDecode> CreatePixelOperations() => new PixelOperations<TestPixelForAgnosticDecode>();

12
tests/ImageSharp.Tests/TestUtilities/TestMemoryAllocator.cs

@ -11,21 +11,21 @@ namespace SixLabors.ImageSharp.Tests.Memory
internal class TestMemoryAllocator : MemoryAllocator
{
private List<AllocationRequest> allocationLog = new List<AllocationRequest>();
public TestMemoryAllocator(byte dirtyValue = 42)
{
this.DirtyValue = dirtyValue;
}
/// <summary>
/// The value to initilazie the result buffer with, with non-clean options (<see cref="AllocationOptions.None"/>)
/// The value to initialize the result buffer with, with non-clean options (<see cref="AllocationOptions.None"/>)
/// </summary>
public byte DirtyValue { get; }
public IList<AllocationRequest> AllocationLog => this.allocationLog;
public override IMemoryOwner<T> Allocate<T>(int length, AllocationOptions options = AllocationOptions.None)
{
{
T[] array = this.AllocateArray<T>(length, options);
return new BasicArrayBuffer<T>(array, length);
}
@ -35,7 +35,7 @@ namespace SixLabors.ImageSharp.Tests.Memory
byte[] array = this.AllocateArray<byte>(length, options);
return new ManagedByteBuffer(array);
}
private T[] AllocateArray<T>(int length, AllocationOptions options)
where T : struct
{
@ -50,7 +50,7 @@ namespace SixLabors.ImageSharp.Tests.Memory
return array;
}
public struct AllocationRequest
{
private AllocationRequest(Type elementType, AllocationOptions allocationOptions, int length, int lengthInBytes)
@ -62,7 +62,7 @@ namespace SixLabors.ImageSharp.Tests.Memory
if (elementType == typeof(Vector4))
{
}
}

4
tests/ImageSharp.Tests/TestUtilities/Tests/ImageComparerTests.cs

@ -27,7 +27,7 @@ namespace SixLabors.ImageSharp.Tests
[WithTestPatternImages(100, 100, PixelTypes.Rgba32, 0, 0)]
public void TolerantImageComparer_ApprovesPerfectSimilarity<TPixel>(
TestImageProvider<TPixel> provider,
float imageTheshold,
float imageThreshold,
int pixelThreshold)
where TPixel : struct, IPixel<TPixel>
{
@ -35,7 +35,7 @@ namespace SixLabors.ImageSharp.Tests
{
using (Image<TPixel> clone = image.Clone())
{
var comparer = ImageComparer.Tolerant(imageTheshold, pixelThreshold);
var comparer = ImageComparer.Tolerant(imageThreshold, pixelThreshold);
comparer.VerifySimilarity(image, clone);
}
}

10
tests/ImageSharp.Tests/TestUtilities/Tests/ReferenceDecoderBenchmarks.cs

@ -51,7 +51,7 @@ namespace SixLabors.ImageSharp.Tests.TestUtilities.Tests
public void BenchmarkMagickPngDecoder<TPixel>(TestImageProvider<TPixel> provider)
where TPixel : struct, IPixel<TPixel>
{
this.BenckmarkDecoderImpl(PngBenchmarkFiles, new MagickReferenceDecoder(), $@"Magick Decode Png");
this.BenchmarkDecoderImpl(PngBenchmarkFiles, new MagickReferenceDecoder(), $@"Magick Decode Png");
}
[Theory(Skip = SkipBenchmarks)]
@ -59,7 +59,7 @@ namespace SixLabors.ImageSharp.Tests.TestUtilities.Tests
public void BenchmarkSystemDrawingPngDecoder<TPixel>(TestImageProvider<TPixel> provider)
where TPixel : struct, IPixel<TPixel>
{
this.BenckmarkDecoderImpl(PngBenchmarkFiles, new SystemDrawingReferenceDecoder(), $@"System.Drawing Decode Png");
this.BenchmarkDecoderImpl(PngBenchmarkFiles, new SystemDrawingReferenceDecoder(), $@"System.Drawing Decode Png");
}
[Theory(Skip = SkipBenchmarks)]
@ -67,7 +67,7 @@ namespace SixLabors.ImageSharp.Tests.TestUtilities.Tests
public void BenchmarkMagickBmpDecoder<TPixel>(TestImageProvider<TPixel> provider)
where TPixel : struct, IPixel<TPixel>
{
this.BenckmarkDecoderImpl(BmpBenchmarkFiles, new MagickReferenceDecoder(), $@"Magick Decode Bmp");
this.BenchmarkDecoderImpl(BmpBenchmarkFiles, new MagickReferenceDecoder(), $@"Magick Decode Bmp");
}
[Theory(Skip = SkipBenchmarks)]
@ -75,10 +75,10 @@ namespace SixLabors.ImageSharp.Tests.TestUtilities.Tests
public void BenchmarkSystemDrawingBmpDecoder<TPixel>(TestImageProvider<TPixel> provider)
where TPixel : struct, IPixel<TPixel>
{
this.BenckmarkDecoderImpl(BmpBenchmarkFiles, new SystemDrawingReferenceDecoder(), $@"System.Drawing Decode Bmp");
this.BenchmarkDecoderImpl(BmpBenchmarkFiles, new SystemDrawingReferenceDecoder(), $@"System.Drawing Decode Bmp");
}
private void BenckmarkDecoderImpl(IEnumerable<string> testFiles, IImageDecoder decoder, string info, int times = DefaultExecutionCount)
private void BenchmarkDecoderImpl(IEnumerable<string> testFiles, IImageDecoder decoder, string info, int times = DefaultExecutionCount)
{
var measure = new MeasureFixture(this.Output);
measure.Measure(times,

Loading…
Cancel
Save