From 028a3a84e6d7f26a0dac16d12e33dcf617939bb0 Mon Sep 17 00:00:00 2001 From: Anton Firszov Date: Thu, 29 Dec 2016 00:22:48 +0100 Subject: [PATCH] JpegTests headers + docs cleanup --- .../Jpg/Components/Decoder/JpegPixelArea.cs | 34 +++++++++---------- .../Formats/Jpg/Block8x8FTests.cs | 7 +++- .../ImageSharp.Tests/Formats/Jpg/JpegTests.cs | 7 +++- .../Formats/Jpg/ReferenceImplementations.cs | 7 +++- .../Jpg/ReferenceImplementationsTests.cs | 7 +++- .../Formats/Jpg/UtilityTestClassBase.cs | 7 +++- 6 files changed, 47 insertions(+), 22 deletions(-) diff --git a/src/ImageSharp/Formats/Jpg/Components/Decoder/JpegPixelArea.cs b/src/ImageSharp/Formats/Jpg/Components/Decoder/JpegPixelArea.cs index 00e2b0e13..29025dc64 100644 --- a/src/ImageSharp/Formats/Jpg/Components/Decoder/JpegPixelArea.cs +++ b/src/ImageSharp/Formats/Jpg/Components/Decoder/JpegPixelArea.cs @@ -7,12 +7,12 @@ namespace ImageSharp.Formats.Jpg using System.Runtime.CompilerServices; /// - /// Represents an area of a Jpeg subimage (channel) + /// Represents an area of a Jpeg subimage (channel) /// internal struct JpegPixelArea { /// - /// Initializes a new instance of the struct from existing data. + /// Initializes a new instance of the struct from existing data. /// /// The pixel array /// The stride @@ -25,32 +25,32 @@ namespace ImageSharp.Formats.Jpg } /// - /// Gets the pixels. + /// Gets the pixels. /// public byte[] Pixels { get; private set; } /// - /// 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)) /// public bool IsInitialized => this.Pixels != null; /// - /// Gets or the stride. + /// Gets or the stride. /// public int Stride { get; } /// - /// Gets or the offset. + /// Gets or the offset. /// public int Offset { get; } /// - /// Gets a of bytes to the pixel area + /// Gets a of bytes to the pixel area /// public MutableSpan Span => new MutableSpan(this.Pixels, this.Offset); /// - /// Returns the pixel at (x, y) + /// Returns the pixel at (x, y) /// /// The x index /// The y index @@ -65,9 +65,9 @@ namespace ImageSharp.Formats.Jpg } /// - /// Creates a new instance of the struct. - /// Pixel array will be taken from a pool, this instance will be the owner of it's pixel data, therefore - /// should be called when the instance is no longer needed. + /// Creates a new instance of the struct. + /// Pixel array will be taken from a pool, this instance will be the owner of it's pixel data, therefore + /// should be called when the instance is no longer needed. /// /// The width. /// The height. @@ -80,7 +80,7 @@ namespace ImageSharp.Formats.Jpg } /// - /// Returns to the pool + /// Returns to the pool /// public void ReturnPooled() { @@ -94,7 +94,7 @@ namespace ImageSharp.Formats.Jpg } /// - /// Gets the subarea that belongs to the Block8x8 defined by block indices + /// Gets the subarea that belongs to the Block8x8 defined by block indices /// /// The block X index /// The block Y index @@ -106,7 +106,7 @@ namespace ImageSharp.Formats.Jpg } /// - /// Gets the row offset at the given position + /// Gets the row offset at the given position /// /// The y-coordinate of the image. /// The @@ -116,9 +116,9 @@ namespace ImageSharp.Formats.Jpg } /// - /// Load values to the pixel area from the given . - /// Level shift [-128.0, 128.0] floating point color values by +128, clip them to [0, 255], and convert them to - /// values + /// Load values to the pixel area from the given . + /// Level shift [-128.0, 128.0] floating point color values by +128, clip them to [0, 255], and convert them to + /// values /// /// The block holding the color values /// Temporal block provided by the caller diff --git a/tests/ImageSharp.Tests/Formats/Jpg/Block8x8FTests.cs b/tests/ImageSharp.Tests/Formats/Jpg/Block8x8FTests.cs index 9bae8d9f3..9ac6386b1 100644 --- a/tests/ImageSharp.Tests/Formats/Jpg/Block8x8FTests.cs +++ b/tests/ImageSharp.Tests/Formats/Jpg/Block8x8FTests.cs @@ -1,4 +1,9 @@ -// Uncomment this to turn unit tests into benchmarks: +// +// Copyright (c) James Jackson-South and contributors. +// Licensed under the Apache License, Version 2.0. +// + +// Uncomment this to turn unit tests into benchmarks: //#define BENCHMARKING // ReSharper disable InconsistentNaming diff --git a/tests/ImageSharp.Tests/Formats/Jpg/JpegTests.cs b/tests/ImageSharp.Tests/Formats/Jpg/JpegTests.cs index 46847873a..81156d970 100644 --- a/tests/ImageSharp.Tests/Formats/Jpg/JpegTests.cs +++ b/tests/ImageSharp.Tests/Formats/Jpg/JpegTests.cs @@ -1,4 +1,9 @@ -using System; +// +// Copyright (c) James Jackson-South and contributors. +// Licensed under the Apache License, Version 2.0. +// + +using System; using System.Collections.Generic; using System.IO; using System.Linq; diff --git a/tests/ImageSharp.Tests/Formats/Jpg/ReferenceImplementations.cs b/tests/ImageSharp.Tests/Formats/Jpg/ReferenceImplementations.cs index d3f29eb25..6aed0d3fa 100644 --- a/tests/ImageSharp.Tests/Formats/Jpg/ReferenceImplementations.cs +++ b/tests/ImageSharp.Tests/Formats/Jpg/ReferenceImplementations.cs @@ -1,4 +1,9 @@ -// ReSharper disable InconsistentNaming +// +// Copyright (c) James Jackson-South and contributors. +// Licensed under the Apache License, Version 2.0. +// + +// ReSharper disable InconsistentNaming namespace ImageSharp.Tests { diff --git a/tests/ImageSharp.Tests/Formats/Jpg/ReferenceImplementationsTests.cs b/tests/ImageSharp.Tests/Formats/Jpg/ReferenceImplementationsTests.cs index dcccc58be..66ddeabc0 100644 --- a/tests/ImageSharp.Tests/Formats/Jpg/ReferenceImplementationsTests.cs +++ b/tests/ImageSharp.Tests/Formats/Jpg/ReferenceImplementationsTests.cs @@ -1,4 +1,9 @@ -// ReSharper disable InconsistentNaming +// +// Copyright (c) James Jackson-South and contributors. +// Licensed under the Apache License, Version 2.0. +// + +// ReSharper disable InconsistentNaming namespace ImageSharp.Tests.Formats.Jpg { using System.Numerics; diff --git a/tests/ImageSharp.Tests/Formats/Jpg/UtilityTestClassBase.cs b/tests/ImageSharp.Tests/Formats/Jpg/UtilityTestClassBase.cs index 650b9fc07..c92c6aa9a 100644 --- a/tests/ImageSharp.Tests/Formats/Jpg/UtilityTestClassBase.cs +++ b/tests/ImageSharp.Tests/Formats/Jpg/UtilityTestClassBase.cs @@ -1,4 +1,9 @@ -using System.Text; +// +// Copyright (c) James Jackson-South and contributors. +// Licensed under the Apache License, Version 2.0. +// + +using System.Text; using ImageSharp.Formats; using Xunit.Abstractions; // ReSharper disable InconsistentNaming