Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Dependencies #1378

Merged
merged 18 commits into from
Oct 15, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Update test 3rd party libraries
JimBobSquarePants committed Oct 12, 2020

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
commit 6fed5f6b5cbb42c9690734620372f1c0e9321fa8
6 changes: 3 additions & 3 deletions tests/Directory.Build.targets
Original file line number Diff line number Diff line change
@@ -29,12 +29,12 @@
<PackageReference Update="BenchmarkDotNet.Diagnostics.Windows" Version="0.12.1" Condition="'$(OS)' == 'Windows_NT'" />
<PackageReference Update="Colourful" Version="2.0.5" />
<PackageReference Update="coverlet.collector" Version="1.3.1-preview.27.gdd2237a3be" PrivateAssets="All"/>
<PackageReference Update="Magick.NET-Q16-AnyCPU" Version="7.15.5" />
<PackageReference Update="Magick.NET-Q16-AnyCPU" Version="7.22.0" />
<PackageReference Update="Microsoft.DotNet.RemoteExecutor" Version="5.0.0-beta.20069.1" />
<PackageReference Update="Microsoft.NET.Test.Sdk" Version="16.5.0" />
<PackageReference Update="Moq" Version="4.14.5" />
<PackageReference Update="Moq" Version="4.14.6" />
<PackageReference Update="Pfim" Version="0.9.1" />
<PackageReference Update="SharpZipLib" Version="1.2.0" />
<PackageReference Update="SharpZipLib" Version="1.3.0" />
<PackageReference Update="System.Drawing.Common" Version="4.7.0" />
<PackageReference Update="xunit" Version="2.4.1" />
<PackageReference Update="xunit.runner.visualstudio" Version="2.4.1" />
6 changes: 3 additions & 3 deletions tests/ImageSharp.Tests/Formats/Tga/TgaTestUtils.cs
Original file line number Diff line number Diff line change
@@ -18,7 +18,7 @@ public static void CompareWithReferenceDecoder<TPixel>(
Image<TPixel> image,
bool useExactComparer = true,
float compareTolerance = 0.01f)
where TPixel : unmanaged, IPixel<TPixel>
where TPixel : unmanaged, ImageSharp.PixelFormats.IPixel<TPixel>
{
string path = TestImageProvider<TPixel>.GetFilePathOrNull(provider);
if (path == null)
@@ -39,7 +39,7 @@ public static void CompareWithReferenceDecoder<TPixel>(
}

public static Image<TPixel> DecodeWithMagick<TPixel>(Configuration configuration, FileInfo fileInfo)
where TPixel : unmanaged, IPixel<TPixel>
where TPixel : unmanaged, ImageSharp.PixelFormats.IPixel<TPixel>
{
using (var magickImage = new MagickImage(fileInfo))
{
@@ -48,7 +48,7 @@ public static Image<TPixel> DecodeWithMagick<TPixel>(Configuration configuration

Assert.True(result.TryGetSinglePixelSpan(out Span<TPixel> resultPixels));

using (IPixelCollection pixels = magickImage.GetPixelsUnsafe())
using (IUnsafePixelCollection<ushort> pixels = magickImage.GetPixelsUnsafe())
{
byte[] data = pixels.ToByteArray(PixelMapping.RGBA);

Original file line number Diff line number Diff line change
@@ -18,7 +18,7 @@ public class MagickReferenceDecoder : IImageDecoder
public static MagickReferenceDecoder Instance { get; } = new MagickReferenceDecoder();

private static void FromRgba32Bytes<TPixel>(Configuration configuration, Span<byte> rgbaBytes, IMemoryGroup<TPixel> destinationGroup)
where TPixel : unmanaged, IPixel<TPixel>
where TPixel : unmanaged, ImageSharp.PixelFormats.IPixel<TPixel>
{
foreach (Memory<TPixel> m in destinationGroup)
{
@@ -33,7 +33,7 @@ private static void FromRgba32Bytes<TPixel>(Configuration configuration, Span<by
}

private static void FromRgba64Bytes<TPixel>(Configuration configuration, Span<byte> rgbaBytes, IMemoryGroup<TPixel> destinationGroup)
where TPixel : unmanaged, IPixel<TPixel>
where TPixel : unmanaged, ImageSharp.PixelFormats.IPixel<TPixel>
{
foreach (Memory<TPixel> m in destinationGroup)
{
@@ -48,17 +48,17 @@ private static void FromRgba64Bytes<TPixel>(Configuration configuration, Span<by
}

public Task<Image<TPixel>> DecodeAsync<TPixel>(Configuration configuration, Stream stream, CancellationToken cancellationToken)
where TPixel : unmanaged, IPixel<TPixel>
where TPixel : unmanaged, ImageSharp.PixelFormats.IPixel<TPixel>
=> Task.FromResult(this.Decode<TPixel>(configuration, stream));

public Image<TPixel> Decode<TPixel>(Configuration configuration, Stream stream)
where TPixel : unmanaged, IPixel<TPixel>
where TPixel : unmanaged, ImageSharp.PixelFormats.IPixel<TPixel>
{
using var magickImage = new MagickImage(stream);
var result = new Image<TPixel>(configuration, magickImage.Width, magickImage.Height);
MemoryGroup<TPixel> resultPixels = result.GetRootFramePixelBuffer().FastMemoryGroup;

using (IPixelCollection pixels = magickImage.GetPixelsUnsafe())
using (IUnsafePixelCollection<ushort> pixels = magickImage.GetPixelsUnsafe())
{
if (magickImage.Depth == 8)
{