From 359a604964568495b24369e027f12538a26b755c Mon Sep 17 00:00:00 2001 From: Jarl Gullberg Date: Fri, 8 Mar 2024 20:30:13 +0100 Subject: [PATCH] Update ImageSharp. Older versions have a security vulnerability, which has forced us to use the latest version which no longer supports .NET Standard. A shame, but life goes on. --- Directory.Build.props | 4 ++++ Directory.Packages.props | 2 +- Puzzle.Tests/Data/SampleImages.cs | 8 +++++++- Puzzle/Puzzle.csproj | 4 ---- 4 files changed, 12 insertions(+), 6 deletions(-) diff --git a/Directory.Build.props b/Directory.Build.props index a338f21..6ef4a1d 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -6,6 +6,10 @@ true + + false + + true diff --git a/Directory.Packages.props b/Directory.Packages.props index 877f65a..c7a4673 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -3,7 +3,7 @@ true - + \ No newline at end of file diff --git a/Puzzle.Tests/Data/SampleImages.cs b/Puzzle.Tests/Data/SampleImages.cs index 7afe7b9..717c834 100644 --- a/Puzzle.Tests/Data/SampleImages.cs +++ b/Puzzle.Tests/Data/SampleImages.cs @@ -9,6 +9,7 @@ using System.Reflection; using System.Threading; using SixLabors.ImageSharp; +using SixLabors.ImageSharp.Formats; using SixLabors.ImageSharp.PixelFormats; namespace Puzzle.Tests.Data; @@ -248,7 +249,12 @@ private static Lazy> GetLazyLoaderForImage(string image) var imageConfiguration = Configuration.Default.Clone(); imageConfiguration.PreferContiguousImageBuffers = true; - return Image.Load(imageConfiguration, resourceStream); + var decoderOptions = new DecoderOptions + { + Configuration = imageConfiguration + }; + + return Image.Load(decoderOptions, resourceStream); }, LazyThreadSafetyMode.ExecutionAndPublication ); diff --git a/Puzzle/Puzzle.csproj b/Puzzle/Puzzle.csproj index 69c0a69..dd2f15f 100644 --- a/Puzzle/Puzzle.csproj +++ b/Puzzle/Puzzle.csproj @@ -1,9 +1,5 @@ - - $(LibraryFrameworks);netstandard2.0 - - Puzzle# A C# implementation of libpuzzle (an image fingerprinting algorithm)