From 849806843b01f01fc0446bc32e4b3d9fd8441ca8 Mon Sep 17 00:00:00 2001 From: Anton Firszov Date: Thu, 28 Jun 2018 02:07:53 +0200 Subject: [PATCH] try to fine-tune tolerance in PngEncoderTests + better Rgba64.ToString() --- src/ImageSharp/PixelFormats/Rgba64.cs | 2 +- tests/ImageSharp.Tests/Formats/Png/PngEncoderTests.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ImageSharp/PixelFormats/Rgba64.cs b/src/ImageSharp/PixelFormats/Rgba64.cs index b0aeab92e..a66485ba4 100644 --- a/src/ImageSharp/PixelFormats/Rgba64.cs +++ b/src/ImageSharp/PixelFormats/Rgba64.cs @@ -290,7 +290,7 @@ namespace SixLabors.ImageSharp.PixelFormats /// public override string ToString() { - return this.ToVector4().ToString(); + return $"({this.R},{this.G},{this.B},{this.A})"; } /// diff --git a/tests/ImageSharp.Tests/Formats/Png/PngEncoderTests.cs b/tests/ImageSharp.Tests/Formats/Png/PngEncoderTests.cs index eaf60be5e..415cffbed 100644 --- a/tests/ImageSharp.Tests/Formats/Png/PngEncoderTests.cs +++ b/tests/ImageSharp.Tests/Formats/Png/PngEncoderTests.cs @@ -21,7 +21,7 @@ namespace SixLabors.ImageSharp.Tests { // This is bull. Failing online for no good reason. // The images are an exact match. Maybe the submodule isn't updating? - private const float ToleranceThresholdForPaletteEncoder = 0.2273F; + private const float ToleranceThresholdForPaletteEncoder = 1.0F / 100; /// /// All types except Palette