Skip to content
首页 » 博客 » Blur Images Programmatically in C#

Blur Images Programmatically in C#

Blur Images Programmatically in C#

When working with image manipulation, you may often need to edit the images by applying different filters/effects. Among various other effects, the blurring effect is commonly used to fade away the objects in an image. In this article, you will learn how to blur an image programmatically in C#.

  • C# API to Blur Images – Free Download
  • Steps to Blur Images in C#
  • Blur an Image in C#

C# API to Blur Images – Free Download#

Aspose.Imaging for .NET is an amazing image processing API that provides a wide range of features to edit the images. We will use this API to apply the blur effect on our images. You can either download the API or install it using NuGet.

PM> Install-Package Aspose.Imaging

Steps to Blur Images in C##

Aspose.Imaging for .NET lets you apply the blur effect on an image within three simple steps, which are given below.

  • First, load the image file.
  • Apply the blur filter on the image.
  • Finally, save the blurred image to the disk.

The following section demonstrates which classes and methods are used to apply blur effect on an image using C#.

Blur an Image in C##

The following are the steps to blur an image in C#.

  • First, load the image using Image.Load() method.
  • Then, cast image to RasterImage type.
  • Blur image using RasterImage.Filter() method.
  • Save blurred image using RasterImage.Save() method.

The following code sample shows how to apply the blur effect on an image in C#.

For demonstration, we applied the blur effect on the following image.

Blur Images Programmatically in C#

The following is the resultant image we get after applying the blur effect.

Blur Images Programmatically in C#

C# Image Blurring API – Get a Free License#

You can get a free temporary license and blur images without evaluation limitations.

Conclusion#

In this article, you have learned how to blur images in C#. You can easily integrate the provided code and blur the images from within your C# applications.

Read More#

You can explore more about the .NET image processing API using documentation. Also, you can share your queries with us via our forum.

See Also#

  • Convert Images to Grayscale in C#
  • Add Watermark to Images using C#
  • Compress PNG, JPEG, and TIFF Images using C#
  • Image Cropping in C#