From 362c5ddbc9a3d90985d7cffb52b5b53d53f45625 Mon Sep 17 00:00:00 2001 From: James Jackson-South Date: Tue, 7 Jul 2020 11:27:22 +0100 Subject: [PATCH 1/9] Update all dependency references. --- Directory.Build.targets | 6 +++--- tests/Directory.Build.targets | 10 +++++----- tests/ImageSharp.Tests/Formats/Tga/TgaTestUtils.cs | 8 +++----- .../ReferenceCodecs/MagickReferenceDecoder.cs | 13 +++++-------- 4 files changed, 16 insertions(+), 21 deletions(-) diff --git a/Directory.Build.targets b/Directory.Build.targets index cc14bbdbf..ab1193e93 100644 --- a/Directory.Build.targets +++ b/Directory.Build.targets @@ -25,12 +25,12 @@ - + - - + + diff --git a/tests/Directory.Build.targets b/tests/Directory.Build.targets index b2d2b1c31..118005382 100644 --- a/tests/Directory.Build.targets +++ b/tests/Directory.Build.targets @@ -25,14 +25,14 @@ - - - + + + - + - + diff --git a/tests/ImageSharp.Tests/Formats/Tga/TgaTestUtils.cs b/tests/ImageSharp.Tests/Formats/Tga/TgaTestUtils.cs index af93884fd..58ed31e61 100644 --- a/tests/ImageSharp.Tests/Formats/Tga/TgaTestUtils.cs +++ b/tests/ImageSharp.Tests/Formats/Tga/TgaTestUtils.cs @@ -5,8 +5,6 @@ using System; using System.IO; using ImageMagick; - -using SixLabors.ImageSharp.Advanced; using SixLabors.ImageSharp.PixelFormats; using SixLabors.ImageSharp.Tests.TestUtilities.ImageComparison; using Xunit; @@ -20,7 +18,7 @@ namespace SixLabors.ImageSharp.Tests.Formats.Tga Image image, bool useExactComparer = true, float compareTolerance = 0.01f) - where TPixel : unmanaged, IPixel + where TPixel : unmanaged, ImageSharp.PixelFormats.IPixel { string path = TestImageProvider.GetFilePathOrNull(provider); if (path == null) @@ -41,7 +39,7 @@ namespace SixLabors.ImageSharp.Tests.Formats.Tga } public static Image DecodeWithMagick(Configuration configuration, FileInfo fileInfo) - where TPixel : unmanaged, IPixel + where TPixel : unmanaged, ImageSharp.PixelFormats.IPixel { using (var magickImage = new MagickImage(fileInfo)) { @@ -50,7 +48,7 @@ namespace SixLabors.ImageSharp.Tests.Formats.Tga Assert.True(result.TryGetSinglePixelSpan(out Span resultPixels)); - using (IPixelCollection pixels = magickImage.GetPixelsUnsafe()) + using (IUnsafePixelCollection pixels = magickImage.GetPixelsUnsafe()) { byte[] data = pixels.ToByteArray(PixelMapping.RGBA); diff --git a/tests/ImageSharp.Tests/TestUtilities/ReferenceCodecs/MagickReferenceDecoder.cs b/tests/ImageSharp.Tests/TestUtilities/ReferenceCodecs/MagickReferenceDecoder.cs index 4d1e75440..61016f277 100644 --- a/tests/ImageSharp.Tests/TestUtilities/ReferenceCodecs/MagickReferenceDecoder.cs +++ b/tests/ImageSharp.Tests/TestUtilities/ReferenceCodecs/MagickReferenceDecoder.cs @@ -3,12 +3,9 @@ using System; using System.IO; -using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Threading.Tasks; using ImageMagick; - -using SixLabors.ImageSharp.Advanced; using SixLabors.ImageSharp.Formats; using SixLabors.ImageSharp.Memory; using SixLabors.ImageSharp.PixelFormats; @@ -20,7 +17,7 @@ namespace SixLabors.ImageSharp.Tests.TestUtilities.ReferenceCodecs public static MagickReferenceDecoder Instance { get; } = new MagickReferenceDecoder(); private static void FromRgba32Bytes(Configuration configuration, Span rgbaBytes, IMemoryGroup destinationGroup) - where TPixel : unmanaged, IPixel + where TPixel : unmanaged, ImageSharp.PixelFormats.IPixel { foreach (Memory m in destinationGroup) { @@ -35,7 +32,7 @@ namespace SixLabors.ImageSharp.Tests.TestUtilities.ReferenceCodecs } private static void FromRgba64Bytes(Configuration configuration, Span rgbaBytes, IMemoryGroup destinationGroup) - where TPixel : unmanaged, IPixel + where TPixel : unmanaged, ImageSharp.PixelFormats.IPixel { foreach (Memory m in destinationGroup) { @@ -50,17 +47,17 @@ namespace SixLabors.ImageSharp.Tests.TestUtilities.ReferenceCodecs } public Task> DecodeAsync(Configuration configuration, Stream stream) - where TPixel : unmanaged, IPixel + where TPixel : unmanaged, ImageSharp.PixelFormats.IPixel => Task.FromResult(this.Decode(configuration, stream)); public Image Decode(Configuration configuration, Stream stream) - where TPixel : unmanaged, IPixel + where TPixel : unmanaged, ImageSharp.PixelFormats.IPixel { using var magickImage = new MagickImage(stream); var result = new Image(configuration, magickImage.Width, magickImage.Height); MemoryGroup resultPixels = result.GetRootFramePixelBuffer().FastMemoryGroup; - using (IPixelCollection pixels = magickImage.GetPixelsUnsafe()) + using (IUnsafePixelCollection pixels = magickImage.GetPixelsUnsafe()) { if (magickImage.Depth == 8) { From 8bd58e7fa8d4f21f4463694301a08737ec154f3f Mon Sep 17 00:00:00 2001 From: James Jackson-South Date: Tue, 7 Jul 2020 15:55:16 +0100 Subject: [PATCH 2/9] Try forcing binding redirects. --- tests/ImageSharp.Tests/ImageSharp.Tests.csproj | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/ImageSharp.Tests/ImageSharp.Tests.csproj b/tests/ImageSharp.Tests/ImageSharp.Tests.csproj index 98f8e9574..efbd5cb05 100644 --- a/tests/ImageSharp.Tests/ImageSharp.Tests.csproj +++ b/tests/ImageSharp.Tests/ImageSharp.Tests.csproj @@ -10,6 +10,11 @@ SixLabors.ImageSharp.Tests true + + + + true + true From 5e8bc11dfb35e0905c12bc23cd7ab5e4faecf54b Mon Sep 17 00:00:00 2001 From: James Jackson-South Date: Fri, 10 Jul 2020 20:51:08 +0100 Subject: [PATCH 3/9] Revert several binary updates. --- Directory.Build.targets | 6 +++--- tests/ImageSharp.Tests/ImageSharp.Tests.csproj | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Directory.Build.targets b/Directory.Build.targets index ab1193e93..cc14bbdbf 100644 --- a/Directory.Build.targets +++ b/Directory.Build.targets @@ -25,12 +25,12 @@ - + - - + + diff --git a/tests/ImageSharp.Tests/ImageSharp.Tests.csproj b/tests/ImageSharp.Tests/ImageSharp.Tests.csproj index efbd5cb05..e828ae057 100644 --- a/tests/ImageSharp.Tests/ImageSharp.Tests.csproj +++ b/tests/ImageSharp.Tests/ImageSharp.Tests.csproj @@ -13,8 +13,8 @@ - true - true + From c488b5b62dc21082ecf2952161856fea710643c7 Mon Sep 17 00:00:00 2001 From: James Jackson-South Date: Thu, 16 Jul 2020 12:30:03 +0100 Subject: [PATCH 4/9] Revert Magick changes --- tests/Directory.Build.targets | 2 +- tests/ImageSharp.Tests/Formats/Tga/TgaTestUtils.cs | 6 +++--- .../ReferenceCodecs/MagickReferenceDecoder.cs | 10 +++++----- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/tests/Directory.Build.targets b/tests/Directory.Build.targets index 118005382..e9e93a855 100644 --- a/tests/Directory.Build.targets +++ b/tests/Directory.Build.targets @@ -29,7 +29,7 @@ - + diff --git a/tests/ImageSharp.Tests/Formats/Tga/TgaTestUtils.cs b/tests/ImageSharp.Tests/Formats/Tga/TgaTestUtils.cs index 58ed31e61..0f76d9931 100644 --- a/tests/ImageSharp.Tests/Formats/Tga/TgaTestUtils.cs +++ b/tests/ImageSharp.Tests/Formats/Tga/TgaTestUtils.cs @@ -18,7 +18,7 @@ namespace SixLabors.ImageSharp.Tests.Formats.Tga Image image, bool useExactComparer = true, float compareTolerance = 0.01f) - where TPixel : unmanaged, ImageSharp.PixelFormats.IPixel + where TPixel : unmanaged, IPixel { string path = TestImageProvider.GetFilePathOrNull(provider); if (path == null) @@ -39,7 +39,7 @@ namespace SixLabors.ImageSharp.Tests.Formats.Tga } public static Image DecodeWithMagick(Configuration configuration, FileInfo fileInfo) - where TPixel : unmanaged, ImageSharp.PixelFormats.IPixel + where TPixel : unmanaged, IPixel { using (var magickImage = new MagickImage(fileInfo)) { @@ -48,7 +48,7 @@ namespace SixLabors.ImageSharp.Tests.Formats.Tga Assert.True(result.TryGetSinglePixelSpan(out Span resultPixels)); - using (IUnsafePixelCollection pixels = magickImage.GetPixelsUnsafe()) + using (IPixelCollection pixels = magickImage.GetPixelsUnsafe()) { byte[] data = pixels.ToByteArray(PixelMapping.RGBA); diff --git a/tests/ImageSharp.Tests/TestUtilities/ReferenceCodecs/MagickReferenceDecoder.cs b/tests/ImageSharp.Tests/TestUtilities/ReferenceCodecs/MagickReferenceDecoder.cs index 61016f277..fae3ff5a5 100644 --- a/tests/ImageSharp.Tests/TestUtilities/ReferenceCodecs/MagickReferenceDecoder.cs +++ b/tests/ImageSharp.Tests/TestUtilities/ReferenceCodecs/MagickReferenceDecoder.cs @@ -17,7 +17,7 @@ namespace SixLabors.ImageSharp.Tests.TestUtilities.ReferenceCodecs public static MagickReferenceDecoder Instance { get; } = new MagickReferenceDecoder(); private static void FromRgba32Bytes(Configuration configuration, Span rgbaBytes, IMemoryGroup destinationGroup) - where TPixel : unmanaged, ImageSharp.PixelFormats.IPixel + where TPixel : unmanaged, IPixel { foreach (Memory m in destinationGroup) { @@ -32,7 +32,7 @@ namespace SixLabors.ImageSharp.Tests.TestUtilities.ReferenceCodecs } private static void FromRgba64Bytes(Configuration configuration, Span rgbaBytes, IMemoryGroup destinationGroup) - where TPixel : unmanaged, ImageSharp.PixelFormats.IPixel + where TPixel : unmanaged, IPixel { foreach (Memory m in destinationGroup) { @@ -47,17 +47,17 @@ namespace SixLabors.ImageSharp.Tests.TestUtilities.ReferenceCodecs } public Task> DecodeAsync(Configuration configuration, Stream stream) - where TPixel : unmanaged, ImageSharp.PixelFormats.IPixel + where TPixel : unmanaged, IPixel => Task.FromResult(this.Decode(configuration, stream)); public Image Decode(Configuration configuration, Stream stream) - where TPixel : unmanaged, ImageSharp.PixelFormats.IPixel + where TPixel : unmanaged, IPixel { using var magickImage = new MagickImage(stream); var result = new Image(configuration, magickImage.Width, magickImage.Height); MemoryGroup resultPixels = result.GetRootFramePixelBuffer().FastMemoryGroup; - using (IUnsafePixelCollection pixels = magickImage.GetPixelsUnsafe()) + using (IPixelCollection pixels = magickImage.GetPixelsUnsafe()) { if (magickImage.Depth == 8) { From 429f6e7c5802eac868ac7619c1357b81d9eee920 Mon Sep 17 00:00:00 2001 From: James Jackson-South Date: Thu, 16 Jul 2020 12:40:31 +0100 Subject: [PATCH 5/9] Remove comments --- tests/ImageSharp.Tests/ImageSharp.Tests.csproj | 5 ----- 1 file changed, 5 deletions(-) diff --git a/tests/ImageSharp.Tests/ImageSharp.Tests.csproj b/tests/ImageSharp.Tests/ImageSharp.Tests.csproj index e828ae057..98f8e9574 100644 --- a/tests/ImageSharp.Tests/ImageSharp.Tests.csproj +++ b/tests/ImageSharp.Tests/ImageSharp.Tests.csproj @@ -10,11 +10,6 @@ SixLabors.ImageSharp.Tests true - - - - From e4869d4055d3b837840b76add57aa30222084226 Mon Sep 17 00:00:00 2001 From: James Jackson-South Date: Thu, 16 Jul 2020 12:55:27 +0100 Subject: [PATCH 6/9] Update System.Buffers --- Directory.Build.targets | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Directory.Build.targets b/Directory.Build.targets index cc14bbdbf..375e9c060 100644 --- a/Directory.Build.targets +++ b/Directory.Build.targets @@ -25,7 +25,7 @@ - + From 8956c1f42d757bcad56f3dc1f3a94d638028e509 Mon Sep 17 00:00:00 2001 From: James Jackson-South Date: Thu, 16 Jul 2020 13:15:01 +0100 Subject: [PATCH 7/9] Update System.Memory --- Directory.Build.targets | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Directory.Build.targets b/Directory.Build.targets index 375e9c060..d18b6fa91 100644 --- a/Directory.Build.targets +++ b/Directory.Build.targets @@ -29,7 +29,7 @@ - + From c5256d03cef17498d790074f28fef2cc1d1bd472 Mon Sep 17 00:00:00 2001 From: James Jackson-South Date: Thu, 16 Jul 2020 13:31:35 +0100 Subject: [PATCH 8/9] Revert "Update System.Memory" This reverts commit dcde797b21c313b63858523a66c9d252ec4a1730. --- Directory.Build.targets | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Directory.Build.targets b/Directory.Build.targets index d18b6fa91..375e9c060 100644 --- a/Directory.Build.targets +++ b/Directory.Build.targets @@ -29,7 +29,7 @@ - + From c7c6291e48c21fa25512a16ac34a75a8418a674d Mon Sep 17 00:00:00 2001 From: James Jackson-South Date: Thu, 16 Jul 2020 13:34:12 +0100 Subject: [PATCH 9/9] Update System.Runtime.CompilerServices.Unsafe --- Directory.Build.targets | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Directory.Build.targets b/Directory.Build.targets index 375e9c060..4e7ab9e6b 100644 --- a/Directory.Build.targets +++ b/Directory.Build.targets @@ -29,8 +29,12 @@ + - +