// // Copyright (c) James Jackson-South and contributors. // Licensed under the Apache License, Version 2.0. // namespace ImageProcessorCore { /// /// The function implements the box algorithm. Similar to nearest neighbour when upscaling. /// When downscaling the pixels will average, merging together. /// public class BoxResampler : IResampler { /// public float Radius => 0.5F; /// public float GetValue(float x) { if (x > -0.5F && x <= 0.5F) { return 1; } return 0; } } }