From fc060a365a17df48cf1e0e15774581ee3e5aaa6d Mon Sep 17 00:00:00 2001 From: Timothy Baldridge Date: Sun, 15 May 2022 06:47:51 -0600 Subject: [PATCH] Use lossy compression --- Wabbajack.CLI/Verbs/ValidateLists.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Wabbajack.CLI/Verbs/ValidateLists.cs b/Wabbajack.CLI/Verbs/ValidateLists.cs index a78132fc..4ba07fb4 100644 --- a/Wabbajack.CLI/Verbs/ValidateLists.cs +++ b/Wabbajack.CLI/Verbs/ValidateLists.cs @@ -12,6 +12,7 @@ using System.Threading.Tasks; using FluentFTP; using Microsoft.Extensions.Logging; using SixLabors.ImageSharp; +using SixLabors.ImageSharp.Formats.Webp; using SixLabors.ImageSharp.Processing; using Wabbajack.CLI.Services; using Wabbajack.Common; @@ -271,7 +272,7 @@ public class ValidateLists : IVerb image.Mutate(x => x .Resize(standardWidth, height)); largeImage = validatedList.RepositoryName.ToRelativePath().Combine(hash.ToHex()+"_large").WithExtension(Ext.Webp); - await image.SaveAsync(largeImage.RelativeTo(reports).ToString(), cancellationToken: token); + await image.SaveAsync(largeImage.RelativeTo(reports).ToString(), new WebpEncoder {Quality = 85}, cancellationToken: token); } ms.Position = 0; @@ -283,7 +284,7 @@ public class ValidateLists : IVerb image.Mutate(x => x .Resize(standardWidth, height)); smallImage = validatedList.RepositoryName.ToRelativePath().Combine(hash.ToHex()+"_small").WithExtension(Ext.Webp); - await image.SaveAsync(smallImage.RelativeTo(reports).ToString(), cancellationToken: token); + await image.SaveAsync(smallImage.RelativeTo(reports).ToString(), new WebpEncoder {Quality = 75}, cancellationToken: token); } return (smallImage, largeImage);