From 09f75f4ac20ddbf1da8ccbc1db93be2101931949 Mon Sep 17 00:00:00 2001 From: Olivia Date: Mon, 19 Dec 2016 10:05:54 +0100 Subject: [PATCH 1/6] Fixing default value type constructor warnings. --- src/ImageSharp/Bootstrapper.cs | 2 +- src/ImageSharp/Common/Helpers/Guard.cs | 1 + src/ImageSharp/Formats/Jpg/Components/Block8x8F.cs | 2 +- src/ImageSharp/Formats/Jpg/JpegDecoderCore.cs | 8 ++++---- 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/ImageSharp/Bootstrapper.cs b/src/ImageSharp/Bootstrapper.cs index de4bcc9389..b29c66c58b 100644 --- a/src/ImageSharp/Bootstrapper.cs +++ b/src/ImageSharp/Bootstrapper.cs @@ -71,7 +71,7 @@ namespace ImageSharp Guard.NotNullOrEmpty(format.Extension, nameof(format), "The extension should not be null or empty."); Guard.NotNullOrEmpty(format.SupportedExtensions, nameof(format), "The supported extensions not be null or empty."); - GuardDuplicate(format); + this.GuardDuplicate(format); this.imageFormats.Add(format); } diff --git a/src/ImageSharp/Common/Helpers/Guard.cs b/src/ImageSharp/Common/Helpers/Guard.cs index b67512525a..cf307e9365 100644 --- a/src/ImageSharp/Common/Helpers/Guard.cs +++ b/src/ImageSharp/Common/Helpers/Guard.cs @@ -65,6 +65,7 @@ namespace ImageSharp /// /// Verifies, that the enumeration is not null and not empty. /// + /// The type of objects in the /// The target enumeration, which should be checked against being null or empty. /// Name of the parameter. /// The error message, if any to add to the exception. diff --git a/src/ImageSharp/Formats/Jpg/Components/Block8x8F.cs b/src/ImageSharp/Formats/Jpg/Components/Block8x8F.cs index 33b73cdd11..b1f0fb4581 100644 --- a/src/ImageSharp/Formats/Jpg/Components/Block8x8F.cs +++ b/src/ImageSharp/Formats/Jpg/Components/Block8x8F.cs @@ -381,7 +381,7 @@ namespace ImageSharp.Formats internal void Clear() { // The cheapest way to do this in C#: - this = new Block8x8F(); + this = default(Block8x8F); } /// diff --git a/src/ImageSharp/Formats/Jpg/JpegDecoderCore.cs b/src/ImageSharp/Formats/Jpg/JpegDecoderCore.cs index c209cde3fe..71cb4c0f68 100644 --- a/src/ImageSharp/Formats/Jpg/JpegDecoderCore.cs +++ b/src/ImageSharp/Formats/Jpg/JpegDecoderCore.cs @@ -1533,12 +1533,12 @@ namespace ImageSharp.Formats // blocks: the third block in the first row has (bx, by) = (2, 0). int bx, by, blockCount = 0; - Block8x8F b = new Block8x8F(); - Block8x8F temp1 = new Block8x8F(); - Block8x8F temp2 = new Block8x8F(); + Block8x8F b = default(Block8x8F); + Block8x8F temp1 = default(Block8x8F); + Block8x8F temp2 = default(Block8x8F); // Tricky way to copy contents of the Unzig static variable to the stack: - StackallocUnzigData unzigOnStack = new StackallocUnzigData(); + StackallocUnzigData unzigOnStack = default(StackallocUnzigData); int* unzigPtr = unzigOnStack.Data; Marshal.Copy(Unzig, 0, (IntPtr)unzigPtr, 64); From a13b865f6acb610e1ba9c369e7837405e3446562 Mon Sep 17 00:00:00 2001 From: Olivia Date: Mon, 19 Dec 2016 10:44:48 +0100 Subject: [PATCH 2/6] Fixing documentation warnings. Moving MutableSpanExtensions into ints own file. --- .../Drawing/Processors/FillShapeProcessor.cs | 2 +- .../Formats/Jpg/Components/Block8x8F.cs | 52 ++++++++---- .../Formats/Jpg/Components/Bytes.cs | 9 +++ .../Formats/Jpg/Components/Huffman.cs | 9 +++ .../Formats/Jpg/Components/MutableSpan.cs | 75 ++++++++--------- .../Jpg/Components/MutableSpanExtensions.cs | 81 +++++++++++++++++++ src/ImageSharp/Formats/Jpg/JpegDecoderCore.cs | 3 + 7 files changed, 171 insertions(+), 60 deletions(-) create mode 100644 src/ImageSharp/Formats/Jpg/Components/MutableSpanExtensions.cs diff --git a/src/ImageSharp/Drawing/Processors/FillShapeProcessor.cs b/src/ImageSharp/Drawing/Processors/FillShapeProcessor.cs index 3209ce9c51..a1678010fc 100644 --- a/src/ImageSharp/Drawing/Processors/FillShapeProcessor.cs +++ b/src/ImageSharp/Drawing/Processors/FillShapeProcessor.cs @@ -87,7 +87,7 @@ namespace ImageSharp.Drawing.Processors int offsetY = y - polyStartY; Vector2 currentPoint = default(Vector2); - Vector2 currentPointOffset = default(Vector2); + for (int x = minX; x < maxX; x++) { int offsetX = x - startX; diff --git a/src/ImageSharp/Formats/Jpg/Components/Block8x8F.cs b/src/ImageSharp/Formats/Jpg/Components/Block8x8F.cs index b1f0fb4581..8b86e3bd5d 100644 --- a/src/ImageSharp/Formats/Jpg/Components/Block8x8F.cs +++ b/src/ImageSharp/Formats/Jpg/Components/Block8x8F.cs @@ -15,9 +15,17 @@ namespace ImageSharp.Formats /// internal partial struct Block8x8F { + /// + /// Vector count + /// public const int VectorCount = 16; + + /// + /// Scalar count + /// public const int ScalarCount = VectorCount * 4; +#pragma warning disable SA1600 // ElementsMustBeDocumented public Vector4 V0L; public Vector4 V0R; @@ -41,6 +49,7 @@ namespace ImageSharp.Formats public Vector4 V7L; public Vector4 V7R; +#pragma warning restore SA1600 // ElementsMustBeDocumented #pragma warning disable SA1310 // FieldNamesMustNotContainUnderscore private static readonly Vector4 C_1_175876 = new Vector4(1.175876f); @@ -59,6 +68,11 @@ namespace ImageSharp.Formats private static readonly Vector4 C_0_125 = new Vector4(0.1250f); #pragma warning restore SA1310 // FieldNamesMustNotContainUnderscore + /// + /// Index into the block + /// + /// The index + /// The float value at the specified index public unsafe float this[int idx] { [MethodImpl(MethodImplOptions.AggressiveInlining)] @@ -143,25 +157,29 @@ namespace ImageSharp.Formats } } + /// + /// Multiply in place + /// + /// Scalar to multiply by [MethodImpl(MethodImplOptions.AggressiveInlining)] - public void MultiplyAllInplace(Vector4 s) + public void MultiplyAllInplace(Vector4 scalar) { - this.V0L *= s; - this.V0R *= s; - this.V1L *= s; - this.V1R *= s; - this.V2L *= s; - this.V2R *= s; - this.V3L *= s; - this.V3R *= s; - this.V4L *= s; - this.V4R *= s; - this.V5L *= s; - this.V5R *= s; - this.V6L *= s; - this.V6R *= s; - this.V7L *= s; - this.V7R *= s; + this.V0L *= scalar; + this.V0R *= scalar; + this.V1L *= scalar; + this.V1R *= scalar; + this.V2L *= scalar; + this.V2R *= scalar; + this.V3L *= scalar; + this.V3R *= scalar; + this.V4L *= scalar; + this.V4R *= scalar; + this.V5L *= scalar; + this.V5R *= scalar; + this.V6L *= scalar; + this.V6R *= scalar; + this.V7L *= scalar; + this.V7R *= scalar; } /// diff --git a/src/ImageSharp/Formats/Jpg/Components/Bytes.cs b/src/ImageSharp/Formats/Jpg/Components/Bytes.cs index f848439a03..127ba478bb 100644 --- a/src/ImageSharp/Formats/Jpg/Components/Bytes.cs +++ b/src/ImageSharp/Formats/Jpg/Components/Bytes.cs @@ -23,8 +23,14 @@ namespace ImageSharp.Formats /// public byte[] Buffer; + /// + /// Start of bytes read + /// public int I; + /// + /// End of bytes read + /// public int J; /// @@ -44,6 +50,9 @@ namespace ImageSharp.Formats return new Bytes { Buffer = ArrayPool.Rent(4096) }; } + /// + /// Disposes of the underlying buffer + /// public void Dispose() { if (this.Buffer != null) diff --git a/src/ImageSharp/Formats/Jpg/Components/Huffman.cs b/src/ImageSharp/Formats/Jpg/Components/Huffman.cs index 74f77f3033..c0d5a5caad 100644 --- a/src/ImageSharp/Formats/Jpg/Components/Huffman.cs +++ b/src/ImageSharp/Formats/Jpg/Components/Huffman.cs @@ -53,6 +53,12 @@ namespace ImageSharp.Formats private static readonly ArrayPool IntBuffer = ArrayPool.Create(JpegDecoderCore.MaxCodeLength, 50); + /// + /// Initializes the Huffman tree + /// + /// Lut size + /// Max N codes + /// Max code length public void Init(int lutSize, int maxNCodes, int maxCodeLength) { this.Lut = UshortBuffer.Rent(1 << lutSize); @@ -62,6 +68,9 @@ namespace ImageSharp.Formats this.Indices = IntBuffer.Rent(maxCodeLength); } + /// + /// Disposes the underlying buffers + /// public void Dispose() { UshortBuffer.Return(this.Lut, true); diff --git a/src/ImageSharp/Formats/Jpg/Components/MutableSpan.cs b/src/ImageSharp/Formats/Jpg/Components/MutableSpan.cs index 4b48998495..c43e73614d 100644 --- a/src/ImageSharp/Formats/Jpg/Components/MutableSpan.cs +++ b/src/ImageSharp/Formats/Jpg/Components/MutableSpan.cs @@ -5,7 +5,6 @@ namespace ImageSharp.Formats { - using System.Numerics; using System.Runtime.CompilerServices; /// @@ -18,24 +17,48 @@ namespace ImageSharp.Formats /// internal struct MutableSpan { + /// + /// Data + /// public T[] Data; + /// + /// Offset + /// public int Offset; + /// + /// Initializes a new instance of the struct. + /// + /// The size of the span + /// The offset (defaults to 0) public MutableSpan(int size, int offset = 0) { this.Data = new T[size]; this.Offset = offset; } + /// + /// Initializes a new instance of the struct. + /// + /// The data + /// The offset (defaults to 0) public MutableSpan(T[] data, int offset = 0) { this.Data = data; this.Offset = offset; } + /// + /// Gets the total count of data + /// public int TotalCount => this.Data.Length - this.Offset; + /// + /// Index into the data + /// + /// The data + /// The value at the specified index public T this[int idx] { [MethodImpl(MethodImplOptions.AggressiveInlining)] @@ -53,57 +76,25 @@ namespace ImageSharp.Formats public static implicit operator MutableSpan(T[] data) => new MutableSpan(data, 0); + /// + /// Slice the data + /// + /// The offset + /// The new [MethodImpl(MethodImplOptions.AggressiveInlining)] public MutableSpan Slice(int offset) { return new MutableSpan(this.Data, this.Offset + offset); } + /// + /// Add to the offset + /// + /// The additional offset [MethodImpl(MethodImplOptions.AggressiveInlining)] public void AddOffset(int offset) { this.Offset += offset; } } - - internal static class MutableSpanExtensions - { - public static MutableSpan Slice(this T[] array, int offset) => new MutableSpan(array, offset); - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static void SaveTo(this MutableSpan data, ref Vector4 v) - { - v.X = data[0]; - v.Y = data[1]; - v.Z = data[2]; - v.W = data[3]; - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static void SaveTo(this MutableSpan data, ref Vector4 v) - { - v.X = data[0]; - v.Y = data[1]; - v.Z = data[2]; - v.W = data[3]; - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static void LoadFrom(this MutableSpan data, ref Vector4 v) - { - data[0] = v.X; - data[1] = v.Y; - data[2] = v.Z; - data[3] = v.W; - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static void LoadFrom(this MutableSpan data, ref Vector4 v) - { - data[0] = (int)v.X; - data[1] = (int)v.Y; - data[2] = (int)v.Z; - data[3] = (int)v.W; - } - } } \ No newline at end of file diff --git a/src/ImageSharp/Formats/Jpg/Components/MutableSpanExtensions.cs b/src/ImageSharp/Formats/Jpg/Components/MutableSpanExtensions.cs new file mode 100644 index 0000000000..42edcd3c4a --- /dev/null +++ b/src/ImageSharp/Formats/Jpg/Components/MutableSpanExtensions.cs @@ -0,0 +1,81 @@ +// +// Copyright (c) James Jackson-South and contributors. +// Licensed under the Apache License, Version 2.0. +// + +namespace ImageSharp.Formats.Jpg.Components +{ + using System.Numerics; + using System.Runtime.CompilerServices; + + /// + /// MutableSpan Extensions + /// + internal static class MutableSpanExtensions + { + /// + /// Slice + /// + /// The type of the data in the span + /// The data array + /// The offset + /// The new + public static MutableSpan Slice(this T[] array, int offset) => new MutableSpan(array, offset); + + /// + /// Save to a Vector4 + /// + /// The data + /// The vector to save to + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void SaveTo(this MutableSpan data, ref Vector4 v) + { + v.X = data[0]; + v.Y = data[1]; + v.Z = data[2]; + v.W = data[3]; + } + + /// + /// Save to a Vector4 + /// + /// The data + /// The vector to save to + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void SaveTo(this MutableSpan data, ref Vector4 v) + { + v.X = data[0]; + v.Y = data[1]; + v.Z = data[2]; + v.W = data[3]; + } + + /// + /// Load from Vector4 + /// + /// The data + /// The vector to load from + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void LoadFrom(this MutableSpan data, ref Vector4 v) + { + data[0] = v.X; + data[1] = v.Y; + data[2] = v.Z; + data[3] = v.W; + } + + /// + /// Load from Vector4 + /// + /// The data + /// The vector to load from + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void LoadFrom(this MutableSpan data, ref Vector4 v) + { + data[0] = (int)v.X; + data[1] = (int)v.Y; + data[2] = (int)v.Z; + data[3] = (int)v.W; + } + } +} diff --git a/src/ImageSharp/Formats/Jpg/JpegDecoderCore.cs b/src/ImageSharp/Formats/Jpg/JpegDecoderCore.cs index 71cb4c0f68..8ce3e1be7d 100644 --- a/src/ImageSharp/Formats/Jpg/JpegDecoderCore.cs +++ b/src/ImageSharp/Formats/Jpg/JpegDecoderCore.cs @@ -449,6 +449,9 @@ namespace ImageSharp.Formats } } + /// + /// Dispose + /// public void Dispose() { for (int i = 0; i < this.huffmanTrees.Length; i++) From 330de98c264faf328002ba85286c70e4bd1a6a1b Mon Sep 17 00:00:00 2001 From: Olivia Date: Mon, 19 Dec 2016 10:49:15 +0100 Subject: [PATCH 3/6] Adding documentation to enums. --- .../Formats/Jpg/Components/MutableSpan.cs | 2 +- .../Formats/Jpg/Components/YCbCrImage.cs | 18 ++++++++++++++++++ src/ImageSharp/Formats/Jpg/JpegDecoderCore.cs | 7 +++++++ 3 files changed, 26 insertions(+), 1 deletion(-) diff --git a/src/ImageSharp/Formats/Jpg/Components/MutableSpan.cs b/src/ImageSharp/Formats/Jpg/Components/MutableSpan.cs index c43e73614d..77ee17fc20 100644 --- a/src/ImageSharp/Formats/Jpg/Components/MutableSpan.cs +++ b/src/ImageSharp/Formats/Jpg/Components/MutableSpan.cs @@ -14,7 +14,7 @@ namespace ImageSharp.Formats /// /// https://github.com/dotnet/corefxlab/blob/master/src/System.Slices/System/Span.cs /// - /// + /// The type of the data in the span internal struct MutableSpan { /// diff --git a/src/ImageSharp/Formats/Jpg/Components/YCbCrImage.cs b/src/ImageSharp/Formats/Jpg/Components/YCbCrImage.cs index 564da379b2..603324bcc7 100644 --- a/src/ImageSharp/Formats/Jpg/Components/YCbCrImage.cs +++ b/src/ImageSharp/Formats/Jpg/Components/YCbCrImage.cs @@ -44,16 +44,34 @@ namespace ImageSharp.Formats /// public enum YCbCrSubsampleRatio { + /// + /// YCbCrSubsampleRatio444 + /// YCbCrSubsampleRatio444, + /// + /// YCbCrSubsampleRatio422 + /// YCbCrSubsampleRatio422, + /// + /// YCbCrSubsampleRatio420 + /// YCbCrSubsampleRatio420, + /// + /// YCbCrSubsampleRatio440 + /// YCbCrSubsampleRatio440, + /// + /// YCbCrSubsampleRatio411 + /// YCbCrSubsampleRatio411, + /// + /// YCbCrSubsampleRatio410 + /// YCbCrSubsampleRatio410, } diff --git a/src/ImageSharp/Formats/Jpg/JpegDecoderCore.cs b/src/ImageSharp/Formats/Jpg/JpegDecoderCore.cs index 8ce3e1be7d..28bec0d926 100644 --- a/src/ImageSharp/Formats/Jpg/JpegDecoderCore.cs +++ b/src/ImageSharp/Formats/Jpg/JpegDecoderCore.cs @@ -224,7 +224,14 @@ namespace ImageSharp.Formats /// internal enum ErrorCodes { + /// + /// NoError + /// NoError, + + /// + /// MissingFF00 + /// MissingFF00 } From de43c8be39db0cd763efa8bfbd559cef321f88a5 Mon Sep 17 00:00:00 2001 From: Olivia Date: Mon, 19 Dec 2016 11:02:22 +0100 Subject: [PATCH 4/6] Fixing multiple lines warnings. --- src/ImageSharp/Formats/Jpg/JpegDecoderCore.cs | 4 ++-- src/ImageSharp/Formats/Jpg/JpegEncoderCore.cs | 12 ++++++++++-- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/src/ImageSharp/Formats/Jpg/JpegDecoderCore.cs b/src/ImageSharp/Formats/Jpg/JpegDecoderCore.cs index 28bec0d926..2d6e3ee7c7 100644 --- a/src/ImageSharp/Formats/Jpg/JpegDecoderCore.cs +++ b/src/ImageSharp/Formats/Jpg/JpegDecoderCore.cs @@ -388,7 +388,7 @@ namespace ImageSharp.Formats this.ProcessApp14Marker(remaining); break; default: - if ((JpegConstants.Markers.APP0 <= marker && marker <= JpegConstants.Markers.APP15) + if ((marker >= JpegConstants.Markers.APP0 && marker <= JpegConstants.Markers.APP15) || marker == JpegConstants.Markers.COM) { this.Skip(remaining); @@ -1488,7 +1488,7 @@ namespace ImageSharp.Formats ah = this.temp[3 + scanComponentCountX2] >> 4; al = this.temp[3 + scanComponentCountX2] & 0x0f; - if ((zigStart == 0 && zigEnd != 0) || zigStart > zigEnd || BlockF.BlockSize <= zigEnd) + if ((zigStart == 0 && zigEnd != 0) || zigStart > zigEnd || zigEnd >= BlockF.BlockSize) { throw new ImageFormatException("Bad spectral selection bounds"); } diff --git a/src/ImageSharp/Formats/Jpg/JpegEncoderCore.cs b/src/ImageSharp/Formats/Jpg/JpegEncoderCore.cs index 2ec65bc5b5..3144fdbd34 100644 --- a/src/ImageSharp/Formats/Jpg/JpegEncoderCore.cs +++ b/src/ImageSharp/Formats/Jpg/JpegEncoderCore.cs @@ -31,6 +31,7 @@ namespace ImageSharp.Formats 39, 46, 53, 60, 61, 54, 47, 55, 62, 63, }; +#pragma warning disable SA1118 // ParameterMustNotSpanMultipleLines /// /// The Huffman encoding specifications. /// This encoder uses the same Huffman encoding for all images. @@ -43,7 +44,10 @@ namespace ImageSharp.Formats { 0, 1, 5, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0 }, - new byte[] { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }), + new byte[] + { + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 + }), new HuffmanSpec( new byte[] { @@ -75,7 +79,10 @@ namespace ImageSharp.Formats { 0, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0 }, - new byte[] { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }), + new byte[] + { + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 + }), // Chrominance AC. new HuffmanSpec( @@ -105,6 +112,7 @@ namespace ImageSharp.Formats 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, 0xf8, 0xf9, 0xfa }) }; +#pragma warning restore SA1118 // ParameterMustNotSpanMultipleLines /// /// The compiled representations of theHuffmanSpec. From c074b63a49737ee905619cc58543ff53fdde2747 Mon Sep 17 00:00:00 2001 From: Olivia Date: Mon, 19 Dec 2016 14:32:26 +0100 Subject: [PATCH 5/6] Renaming files with generic types to match {T} pattern. --- .../Brushes/{Brushes`2.cs => Brushes{TColor,TPacked}.cs} | 2 +- .../Brushes/{ImageBrush`2.cs => ImageBrush{TColor,TPacked}.cs} | 2 +- .../{PatternBrush`2.cs => PatternBrush{TColor,TPacked}.cs} | 2 +- .../Brushes/{SolidBrush`2.cs => SolidBrush{TColor,TPacked}.cs} | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) rename src/ImageSharp/Drawing/Brushes/{Brushes`2.cs => Brushes{TColor,TPacked}.cs} (98%) rename src/ImageSharp/Drawing/Brushes/{ImageBrush`2.cs => ImageBrush{TColor,TPacked}.cs} (97%) rename src/ImageSharp/Drawing/Brushes/{PatternBrush`2.cs => PatternBrush{TColor,TPacked}.cs} (98%) rename src/ImageSharp/Drawing/Brushes/{SolidBrush`2.cs => SolidBrush{TColor,TPacked}.cs} (96%) diff --git a/src/ImageSharp/Drawing/Brushes/Brushes`2.cs b/src/ImageSharp/Drawing/Brushes/Brushes{TColor,TPacked}.cs similarity index 98% rename from src/ImageSharp/Drawing/Brushes/Brushes`2.cs rename to src/ImageSharp/Drawing/Brushes/Brushes{TColor,TPacked}.cs index 2e2eb5ad30..8bb2c698b7 100644 --- a/src/ImageSharp/Drawing/Brushes/Brushes`2.cs +++ b/src/ImageSharp/Drawing/Brushes/Brushes{TColor,TPacked}.cs @@ -1,4 +1,4 @@ -// +// // Copyright (c) James Jackson-South and contributors. // Licensed under the Apache License, Version 2.0. // diff --git a/src/ImageSharp/Drawing/Brushes/ImageBrush`2.cs b/src/ImageSharp/Drawing/Brushes/ImageBrush{TColor,TPacked}.cs similarity index 97% rename from src/ImageSharp/Drawing/Brushes/ImageBrush`2.cs rename to src/ImageSharp/Drawing/Brushes/ImageBrush{TColor,TPacked}.cs index 19e0591a90..9fcb11038b 100644 --- a/src/ImageSharp/Drawing/Brushes/ImageBrush`2.cs +++ b/src/ImageSharp/Drawing/Brushes/ImageBrush{TColor,TPacked}.cs @@ -1,4 +1,4 @@ -// +// // Copyright (c) James Jackson-South and contributors. // Licensed under the Apache License, Version 2.0. // diff --git a/src/ImageSharp/Drawing/Brushes/PatternBrush`2.cs b/src/ImageSharp/Drawing/Brushes/PatternBrush{TColor,TPacked}.cs similarity index 98% rename from src/ImageSharp/Drawing/Brushes/PatternBrush`2.cs rename to src/ImageSharp/Drawing/Brushes/PatternBrush{TColor,TPacked}.cs index cdbdf23ad2..9d18342d98 100644 --- a/src/ImageSharp/Drawing/Brushes/PatternBrush`2.cs +++ b/src/ImageSharp/Drawing/Brushes/PatternBrush{TColor,TPacked}.cs @@ -1,4 +1,4 @@ -// +// // Copyright (c) James Jackson-South and contributors. // Licensed under the Apache License, Version 2.0. // diff --git a/src/ImageSharp/Drawing/Brushes/SolidBrush`2.cs b/src/ImageSharp/Drawing/Brushes/SolidBrush{TColor,TPacked}.cs similarity index 96% rename from src/ImageSharp/Drawing/Brushes/SolidBrush`2.cs rename to src/ImageSharp/Drawing/Brushes/SolidBrush{TColor,TPacked}.cs index f882d59b35..351373b232 100644 --- a/src/ImageSharp/Drawing/Brushes/SolidBrush`2.cs +++ b/src/ImageSharp/Drawing/Brushes/SolidBrush{TColor,TPacked}.cs @@ -1,4 +1,4 @@ -// +// // Copyright (c) James Jackson-South and contributors. // Licensed under the Apache License, Version 2.0. // From c07cd223de33508d231f448b0a75b16ce527bacd Mon Sep 17 00:00:00 2001 From: Olivia Date: Mon, 19 Dec 2016 14:33:18 +0100 Subject: [PATCH 6/6] Removing unused variables in test. --- tests/ImageSharp.Tests/Formats/Jpg/ReferenceImplementations.cs | 2 -- 1 file changed, 2 deletions(-) diff --git a/tests/ImageSharp.Tests/Formats/Jpg/ReferenceImplementations.cs b/tests/ImageSharp.Tests/Formats/Jpg/ReferenceImplementations.cs index b620c1d19f..cee236adfa 100644 --- a/tests/ImageSharp.Tests/Formats/Jpg/ReferenceImplementations.cs +++ b/tests/ImageSharp.Tests/Formats/Jpg/ReferenceImplementations.cs @@ -56,11 +56,9 @@ namespace ImageSharp.Tests.Formats.Jpg float a0, a1, a2, a3, b0, b1, b2, b3; float z0, z1, z2, z3, z4; - float r0 = 1.414214f; float r1 = 1.387040f; float r2 = 1.306563f; float r3 = 1.175876f; - float r4 = 1.000000f; float r5 = 0.785695f; float r6 = 0.541196f; float r7 = 0.275899f;