SVG Filters - C# Code

[ Hide Show ]

What is an SVG Filter?

SVG filters are widely used to add special effects to bitmaps or vector graphics. Filter effects are a way of a visual element’s treatment before displaying it in the document. In other words, it is a set of operations to apply on an image can produce a wide variety of color and lighting effects, blurring, warping, noise and texture generation, etc. SVG filters are capable of creating complex effects in the browser and have the potential to be using in a variety of projects. They are supported by almost all modern browsers, including mobile ones.

Filter defines by <filter> element which sets within a <defs> element. It is never rendered itself and is conceptually described as the element that includes its children - filter primitives. The <filter> element has a set of attributes, here are some of them: x, y, width, height, in, result, etc. Each filter primitive makes a single graphical operation producing a visible result. The advantage of SVG filters is the ability to combine multiple types. The results obtained after applying one filter can be the source of the image for another filter.

In the articles of this section, we’ll show you how to create filters in SVG code and describe C# examples of implementing SVG filters using the Aspose.SVG for .NET library.

The following articles are available:

For more information about filter primitives, see the W3C Filter Effects Module.

If you’re wondering how to write SVG code to create SVG filters, Gaussian blur, shadow effects, lighting effects, or linear gradient and radial gradient, please visit the SVG Filters and Gradients article.

Subscribe to Aspose Product Updates

Get monthly newsletters & offers directly delivered to your mailbox.