// // Copyright (c) James South and contributors. // Licensed under the Apache License, Version 2.0. // namespace ImageProcessor.Samplers { /// /// The function implements the Lanczos kernel algorithm as described on /// Wikipedia /// public class Lanczos5Resampler : IResampler { /// public double Radius => 5; /// public double GetValue(double x) { if (x < 0) { x = -x; } if (x < 5) { return ImageMaths.SinC(x) * ImageMaths.SinC(x / 5f); } return 0; } } }