Browse Source

JpegTests headers + docs cleanup

af/merge-core
Anton Firszov 9 years ago
parent
commit
028a3a84e6
  1. 34
      src/ImageSharp/Formats/Jpg/Components/Decoder/JpegPixelArea.cs
  2. 7
      tests/ImageSharp.Tests/Formats/Jpg/Block8x8FTests.cs
  3. 7
      tests/ImageSharp.Tests/Formats/Jpg/JpegTests.cs
  4. 7
      tests/ImageSharp.Tests/Formats/Jpg/ReferenceImplementations.cs
  5. 7
      tests/ImageSharp.Tests/Formats/Jpg/ReferenceImplementationsTests.cs
  6. 7
      tests/ImageSharp.Tests/Formats/Jpg/UtilityTestClassBase.cs

34
src/ImageSharp/Formats/Jpg/Components/Decoder/JpegPixelArea.cs

@ -7,12 +7,12 @@ namespace ImageSharp.Formats.Jpg
using System.Runtime.CompilerServices;
/// <summary>
/// Represents an area of a Jpeg subimage (channel)
/// Represents an area of a Jpeg subimage (channel)
/// </summary>
internal struct JpegPixelArea
{
/// <summary>
/// Initializes a new instance of the <see cref="JpegPixelArea" /> struct from existing data.
/// Initializes a new instance of the <see cref="JpegPixelArea" /> struct from existing data.
/// </summary>
/// <param name="pixels">The pixel array</param>
/// <param name="striede">The stride</param>
@ -25,32 +25,32 @@ namespace ImageSharp.Formats.Jpg
}
/// <summary>
/// Gets the pixels.
/// Gets the pixels.
/// </summary>
public byte[] Pixels { get; private set; }
/// <summary>
/// Gets a value indicating whether the instance has been initalized. (Is not default(JpegPixelArea))
/// Gets a value indicating whether the instance has been initalized. (Is not default(JpegPixelArea))
/// </summary>
public bool IsInitialized => this.Pixels != null;
/// <summary>
/// Gets or the stride.
/// Gets or the stride.
/// </summary>
public int Stride { get; }
/// <summary>
/// Gets or the offset.
/// Gets or the offset.
/// </summary>
public int Offset { get; }
/// <summary>
/// Gets a <see cref="MutableSpan{T}" /> of bytes to the pixel area
/// Gets a <see cref="MutableSpan{T}" /> of bytes to the pixel area
/// </summary>
public MutableSpan<byte> Span => new MutableSpan<byte>(this.Pixels, this.Offset);
/// <summary>
/// Returns the pixel at (x, y)
/// Returns the pixel at (x, y)
/// </summary>
/// <param name="x">The x index</param>
/// <param name="y">The y index</param>
@ -65,9 +65,9 @@ namespace ImageSharp.Formats.Jpg
}
/// <summary>
/// Creates a new instance of the <see cref="JpegPixelArea" /> struct.
/// Pixel array will be taken from a pool, this instance will be the owner of it's pixel data, therefore
/// <see cref="ReturnPooled" /> should be called when the instance is no longer needed.
/// Creates a new instance of the <see cref="JpegPixelArea" /> struct.
/// Pixel array will be taken from a pool, this instance will be the owner of it's pixel data, therefore
/// <see cref="ReturnPooled" /> should be called when the instance is no longer needed.
/// </summary>
/// <param name="width">The width.</param>
/// <param name="height">The height.</param>
@ -80,7 +80,7 @@ namespace ImageSharp.Formats.Jpg
}
/// <summary>
/// Returns <see cref="Pixels" /> to the pool
/// Returns <see cref="Pixels" /> to the pool
/// </summary>
public void ReturnPooled()
{
@ -94,7 +94,7 @@ namespace ImageSharp.Formats.Jpg
}
/// <summary>
/// Gets the subarea that belongs to the Block8x8 defined by block indices
/// Gets the subarea that belongs to the Block8x8 defined by block indices
/// </summary>
/// <param name="bx">The block X index</param>
/// <param name="by">The block Y index</param>
@ -106,7 +106,7 @@ namespace ImageSharp.Formats.Jpg
}
/// <summary>
/// Gets the row offset at the given position
/// Gets the row offset at the given position
/// </summary>
/// <param name="y">The y-coordinate of the image.</param>
/// <returns>The <see cref="int" /></returns>
@ -116,9 +116,9 @@ namespace ImageSharp.Formats.Jpg
}
/// <summary>
/// Load values to the pixel area from the given <see cref="Block8x8F" />.
/// Level shift [-128.0, 128.0] floating point color values by +128, clip them to [0, 255], and convert them to
/// <see cref="byte" /> values
/// Load values to the pixel area from the given <see cref="Block8x8F" />.
/// Level shift [-128.0, 128.0] floating point color values by +128, clip them to [0, 255], and convert them to
/// <see cref="byte" /> values
/// </summary>
/// <param name="block">The block holding the color values</param>
/// <param name="temp">Temporal block provided by the caller</param>

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

@ -1,4 +1,9 @@
// Uncomment this to turn unit tests into benchmarks:
// <copyright file="Block8x8FTests.cs" company="James Jackson-South">
// Copyright (c) James Jackson-South and contributors.
// Licensed under the Apache License, Version 2.0.
// </copyright>
// Uncomment this to turn unit tests into benchmarks:
//#define BENCHMARKING
// ReSharper disable InconsistentNaming

7
tests/ImageSharp.Tests/Formats/Jpg/JpegTests.cs

@ -1,4 +1,9 @@
using System;
// <copyright file="JpegTests.cs" company="James Jackson-South">
// Copyright (c) James Jackson-South and contributors.
// Licensed under the Apache License, Version 2.0.
// </copyright>
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;

7
tests/ImageSharp.Tests/Formats/Jpg/ReferenceImplementations.cs

@ -1,4 +1,9 @@
// ReSharper disable InconsistentNaming
// <copyright file="ReferenceImplementations.cs" company="James Jackson-South">
// Copyright (c) James Jackson-South and contributors.
// Licensed under the Apache License, Version 2.0.
// </copyright>
// ReSharper disable InconsistentNaming
namespace ImageSharp.Tests
{

7
tests/ImageSharp.Tests/Formats/Jpg/ReferenceImplementationsTests.cs

@ -1,4 +1,9 @@
// ReSharper disable InconsistentNaming
// <copyright file="ReferenceImplementationsTests.cs" company="James Jackson-South">
// Copyright (c) James Jackson-South and contributors.
// Licensed under the Apache License, Version 2.0.
// </copyright>
// ReSharper disable InconsistentNaming
namespace ImageSharp.Tests.Formats.Jpg
{
using System.Numerics;

7
tests/ImageSharp.Tests/Formats/Jpg/UtilityTestClassBase.cs

@ -1,4 +1,9 @@
using System.Text;
// <copyright file="UtilityTestClassBase.cs" company="James Jackson-South">
// Copyright (c) James Jackson-South and contributors.
// Licensed under the Apache License, Version 2.0.
// </copyright>
using System.Text;
using ImageSharp.Formats;
using Xunit.Abstractions;
// ReSharper disable InconsistentNaming

Loading…
Cancel
Save