Skip to content

Commit

Permalink
Update ImageSharp.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Nihlus committed Mar 8, 2024
1 parent a986083 commit 359a604
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 6 deletions.
4 changes: 4 additions & 0 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@
<UseSPDXFileHeaders>true</UseSPDXFileHeaders>
</PropertyGroup>

<PropertyGroup>
<TargetNetStandard>false</TargetNetStandard>
</PropertyGroup>

<!-- NuGet-related properties -->
<PropertyGroup>
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>
Expand Down
2 changes: 1 addition & 1 deletion Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
</PropertyGroup>
<ItemGroup>
<PackageVersion Include="SixLabors.ImageSharp" Version="2.1.6" />
<PackageVersion Include="SixLabors.ImageSharp" Version="3.1.3" />
<PackageVersion Include="System.Memory" Version="4.5.5" />
</ItemGroup>
</Project>
8 changes: 7 additions & 1 deletion Puzzle.Tests/Data/SampleImages.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -248,7 +249,12 @@ private static Lazy<Image<L8>> GetLazyLoaderForImage(string image)
var imageConfiguration = Configuration.Default.Clone();
imageConfiguration.PreferContiguousImageBuffers = true;
return Image.Load<L8>(imageConfiguration, resourceStream);
var decoderOptions = new DecoderOptions
{
Configuration = imageConfiguration
};
return Image.Load<L8>(decoderOptions, resourceStream);
},
LazyThreadSafetyMode.ExecutionAndPublication
);
Expand Down
4 changes: 0 additions & 4 deletions Puzzle/Puzzle.csproj
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
<Project Sdk="Remora.Sdk">

<PropertyGroup>
<LibraryFrameworks>$(LibraryFrameworks);netstandard2.0</LibraryFrameworks>
</PropertyGroup>

<PropertyGroup>
<Title>Puzzle#</Title>
<Description>A C# implementation of libpuzzle (an image fingerprinting algorithm)</Description>
Expand Down

0 comments on commit 359a604

Please sign in to comment.