public static IImageProcessingContext <TPixel> Blur <TPixel>(this IImageProcessingContext <TPixel> source, Rectangle sourceRectangle, BlurMode mode, float radius) where TPixel : struct, IPixel <TPixel> { if (mode == BlurMode.Box) { return(source.BoxBlur((int)radius, sourceRectangle)); } if (mode == BlurMode.Gaussian) { return(source.GaussianBlur(radius, sourceRectangle)); } throw new NotImplementedException(); }
protected override void Apply(IImageProcessingContext ctx, int value, Rectangle bounds) => ctx.BoxBlur(value, bounds);
protected override void Apply(IImageProcessingContext ctx, int value) => ctx.BoxBlur(value);