Use Robidoux algorithm for resizing covers

This commit is contained in:
Glax 2024-10-31 21:50:46 +01:00
parent 1cb8899195
commit f7daacf0d4

View File

@ -2,6 +2,7 @@
using SixLabors.ImageSharp.Processing;
using System.Net;
using System.Text.RegularExpressions;
using SixLabors.ImageSharp.Processing.Processors.Transforms;
using Tranga.Jobs;
using Tranga.MangaConnectors;
@ -99,7 +100,7 @@ public partial class Server
? new Size(width, (width / image.Width) * image.Height)
: new Size((height / image.Height) * image.Width, height);
image.Mutate(x => x.Resize(newSize));
image.Mutate(x => x.Resize(newSize, CubicResampler.Robidoux, true));
}
return new ValueTuple<HttpStatusCode, object?>(HttpStatusCode.OK, image);
}