From 55b67ada2f659463f438303e77d0f1b1de4c47bc Mon Sep 17 00:00:00 2001 From: Brian Popow Date: Thu, 4 Nov 2021 21:40:02 +0100 Subject: [PATCH] Use webpMagick.Quality for the quality parameter --- tests/ImageSharp.Benchmarks/Codecs/EncodeWebp.cs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tests/ImageSharp.Benchmarks/Codecs/EncodeWebp.cs b/tests/ImageSharp.Benchmarks/Codecs/EncodeWebp.cs index 59814f465c..2229849921 100644 --- a/tests/ImageSharp.Benchmarks/Codecs/EncodeWebp.cs +++ b/tests/ImageSharp.Benchmarks/Codecs/EncodeWebp.cs @@ -59,7 +59,7 @@ namespace SixLabors.ImageSharp.Benchmarks.Codecs NearLossless = 100 }; - this.webpMagick.Settings.SetDefine(MagickFormat.WebP, "quality", 75); + this.webpMagick.Quality = 75; this.webpMagick.Write(memoryStream, defines); } @@ -91,8 +91,7 @@ namespace SixLabors.ImageSharp.Benchmarks.Codecs NearLossless = 100 }; - this.webpMagick.Settings.SetDefine(MagickFormat.WebP, "exact", false); - this.webpMagick.Settings.SetDefine(MagickFormat.WebP, "quality", 75); + this.webpMagick.Quality = 75; this.webpMagick.Write(memoryStream, defines); } @@ -105,6 +104,8 @@ namespace SixLabors.ImageSharp.Benchmarks.Codecs FileFormat = WebpFileFormatType.Lossless, Method = WebpEncodingMethod.Level4, NearLossless = false, + + // This is equal to exact = false in libwebp, which is the default. TransparentColorMode = WebpTransparentColorMode.Clear }); }