mirror of
https://github.com/wabbajack-tools/wabbajack.git
synced 2024-08-30 18:42:17 +00:00
Use lossy compression
This commit is contained in:
parent
7ef7a2ae27
commit
fc060a365a
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user