-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathGaussianBlurEffectHandler.cs
More file actions
30 lines (27 loc) · 953 Bytes
/
GaussianBlurEffectHandler.cs
File metadata and controls
30 lines (27 loc) · 953 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
using Microsoft.Graphics.Canvas.Effects;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Ryken.Video.Effects.Core;
namespace Ryken.Video.Effects
{
public sealed class GaussianBlurEffectHandler : SimpleEffectHandlerBase<GaussianBlurEffect>
{
/// <summary>
/// Gets or sets the amount of blur to be applied to the image.
/// </summary>
public float BlurAmount { get; set; } = 10;
/// <summary>
/// Level of performance optimization.
/// </summary>
public EffectOptimization Optimization { get; set; } = EffectOptimization.Speed;
protected override void SetEffectProperties(IVideoEffectHandlerArgs args, GaussianBlurEffect effect)
{
effect.Source = args.InputFrame;
effect.BlurAmount = BlurAmount;
effect.Optimization = Optimization;
}
}
}