Skip to content

Commit 4551f45

Browse files
Tweak Png decode/resize differences for ARM64
1 parent 4938220 commit 4551f45

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

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

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// Copyright (c) Six Labors.
22
// Licensed under the Six Labors Split License.
33

4+
using System.Runtime.InteropServices;
45
using Microsoft.DotNet.RemoteExecutor;
56
using SixLabors.ImageSharp.Formats;
67
using SixLabors.ImageSharp.Formats.Png;
@@ -120,8 +121,11 @@ public void PngDecoder_Decode_Resize<TPixel>(TestImageProvider<TPixel> provider)
120121
FormattableString details = $"{options.TargetSize.Value.Width}_{options.TargetSize.Value.Height}";
121122

122123
image.DebugSave(provider, testOutputDetails: details, appendPixelTypeToFileName: false);
124+
125+
// Floating point differences result in minor pixel differences.
126+
// Output have been manually verified.
123127
image.CompareToReferenceOutput(
124-
ImageComparer.TolerantPercentage(0.0003F), // Magick decoder shows difference on Mac
128+
ImageComparer.TolerantPercentage(TestEnvironment.OSArchitecture == Architecture.Arm64 ? 0.0005F : 0.0003F),
125129
provider,
126130
testOutputDetails: details,
127131
appendPixelTypeToFileName: false);

0 commit comments

Comments
 (0)