[C#]
using (Bitmap bm = (Bitmap)Bitmap.FromFile(Server.MapPath("rez/tim-mossholder-j8F0PDu5d60-unsplash.jpg"))) {
Effects.GaussianBlur(bm, 2);
// no unsharp mask - this is the base blurred image
bm.Save(Server.MapPath("IG8_Effects_UnsharpMask1.png"));
}
using (Bitmap bm = (Bitmap)Bitmap.FromFile(Server.MapPath("rez/tim-mossholder-j8F0PDu5d60-unsplash.jpg"))) {
Effects.GaussianBlur(bm, 2);
Effects.UnsharpMask(bm, null, null, null);
bm.Save(Server.MapPath("IG8_Effects_UnsharpMask2.png"));
}
using (Bitmap bm = (Bitmap)Bitmap.FromFile(Server.MapPath("rez/tim-mossholder-j8F0PDu5d60-unsplash.jpg"))) {
Effects.GaussianBlur(bm, 2);
Effects.UnsharpMask(bm, 8, 140, 40);
bm.Save(Server.MapPath("IG8_Effects_UnsharpMask3.png"));
}
The following example shows the basic effect of Unsharp Mask on
a blurred photo and how the parameters can change the effect
produced. Ouput files are shown below.

tim-mossholder-j8F0PDu5d60-unsplash.jpg

IG8_Effects_UnsharpMask1.png

IG8_Effects_UnsharpMask2.png

IG8_Effects_UnsharpMask3.png
|