Browse Source

Tweak Png decode/resize differences for ARM64

pull/2341/head
James Jackson-South 3 years ago
parent
commit
4551f457b0
  1. 6
      tests/ImageSharp.Tests/Formats/Png/PngDecoderTests.cs

6
tests/ImageSharp.Tests/Formats/Png/PngDecoderTests.cs

@ -1,6 +1,7 @@
// Copyright (c) Six Labors.
// Licensed under the Six Labors Split License.
using System.Runtime.InteropServices;
using Microsoft.DotNet.RemoteExecutor;
using SixLabors.ImageSharp.Formats;
using SixLabors.ImageSharp.Formats.Png;
@ -120,8 +121,11 @@ public partial class PngDecoderTests
FormattableString details = $"{options.TargetSize.Value.Width}_{options.TargetSize.Value.Height}";
image.DebugSave(provider, testOutputDetails: details, appendPixelTypeToFileName: false);
// Floating point differences result in minor pixel differences.
// Output have been manually verified.
image.CompareToReferenceOutput(
ImageComparer.TolerantPercentage(0.0003F), // Magick decoder shows difference on Mac
ImageComparer.TolerantPercentage(TestEnvironment.OSArchitecture == Architecture.Arm64 ? 0.0005F : 0.0003F),
provider,
testOutputDetails: details,
appendPixelTypeToFileName: false);

Loading…
Cancel
Save