-
Notifications
You must be signed in to change notification settings - Fork 62
Expand file tree
/
Copy pathProgram.cs
More file actions
29 lines (23 loc) · 878 Bytes
/
Program.cs
File metadata and controls
29 lines (23 loc) · 878 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
// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
using SixLabors.ImageSharp;
using SixLabors.ImageSharp.Drawing;
using SixLabors.ImageSharp.Drawing.Processing;
using SixLabors.ImageSharp.Processing;
using System;
namespace CustomImageProcessor
{
static class Program
{
static void Main(string[] args)
{
System.IO.Directory.CreateDirectory("output");
using Image image = Image.Load("fb.jpg");
int outerRadii = Math.Min(image.Width, image.Height) / 2;
IPath star = new Star(new PointF(image.Width / 2, image.Height / 2), 5, outerRadii / 2, outerRadii).AsClosedPath();
// Apply the effect here inside the shape
image.Mutate(x => x.Clip(star, y => y.GaussianBlur(15)));
image.Save("output/fb.png");
}
}
}