mirror of
https://github.com/C9Glax/tranga.git
synced 2025-02-23 07:40:13 +01:00
Use Robidoux algorithm for resizing covers
This commit is contained in:
parent
1cb8899195
commit
f7daacf0d4
@ -2,6 +2,7 @@
|
|||||||
using SixLabors.ImageSharp.Processing;
|
using SixLabors.ImageSharp.Processing;
|
||||||
using System.Net;
|
using System.Net;
|
||||||
using System.Text.RegularExpressions;
|
using System.Text.RegularExpressions;
|
||||||
|
using SixLabors.ImageSharp.Processing.Processors.Transforms;
|
||||||
using Tranga.Jobs;
|
using Tranga.Jobs;
|
||||||
using Tranga.MangaConnectors;
|
using Tranga.MangaConnectors;
|
||||||
|
|
||||||
@ -99,7 +100,7 @@ public partial class Server
|
|||||||
? new Size(width, (width / image.Width) * image.Height)
|
? new Size(width, (width / image.Width) * image.Height)
|
||||||
: new Size((height / image.Height) * image.Width, 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);
|
return new ValueTuple<HttpStatusCode, object?>(HttpStatusCode.OK, image);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user