コード例 #1
0
ファイル: Effects.cs プロジェクト: vpenades/UberFactory
        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();
        }
コード例 #2
0
ファイル: BoxBlurTest.cs プロジェクト: Franz1960/ImageSharp
 protected override void Apply(IImageProcessingContext ctx, int value, Rectangle bounds) =>
 ctx.BoxBlur(value, bounds);
コード例 #3
0
ファイル: BoxBlurTest.cs プロジェクト: Franz1960/ImageSharp
 protected override void Apply(IImageProcessingContext ctx, int value) => ctx.BoxBlur(value);