Apply advanced effects to your images. Requires Full Trust.
The plugin currently applies effects to the image along with any background color, padding, or drop shadow that may be present. Future versions may simply apply the effect to the image, not the surrounding area. Note: does not affect borders or watermarks.
Install-Package ImageResizer.Plugins.AdvancedFilters in the NuGet package manager, or:
ImageResizer.Plugins.AdvancedFilters.dllto your project. Make sure
AForge.Imaging.dllare copied also, although they do not need to be referenced directly.
<add name="AdvancedFilters" />inside
- Gaussian blur with adjustable radius:
- Gaussian sharpen with adjustable radius:
Alpha effects (may change or disappear without notice)
Please note the following effects are only preset for evaluation. If you like one and find a practical use for it, please let me know! Otherwise it might disappear to reduce the code surface area.
Also, note the order in which effects are applied WILL CHANGE in future releases. Don't combine them if you want repeatable results.
The names for these will probably also change in future releases.
Contrast, saturation, and brightness adjustment
Hint: Start with values between -0.1 and 0.1. Values have a big effect.
Automatic white balance (alpha feature of v3.3.0+)
Automatically corrects the white balance of the photo with 1 of 3 algorithms.
area- Threshold is applied based on cumulative area at the lower and upper ends of the histogram. Much larger thresholds are required for this than SimpleThreshold.
simple- Simple upper and lower usage thresholds are applied to the values in each channel's histogram to determine the input start/stop points for each individual channel. The start/stop points are used to calculate the scale factor and offset for the channel.
gimp- Threshold is applied based on strangely skewed cumulative area, identical to the process used by GIMP.
The default (and recommended) algorithm is 'area'.
&a.balancethreshold=0.6|0.06(simple white balance requires a smaller threshold.)
gimp algorithms, the default threshold is 0.6. For
simple 0.06 is used (as it is not compared against cumulative area, but an individual value's usage)
Automatic histogram adjustment (Good for daylight photos)
Adjusts contrast, saturation, and brightness with curves based on the histogram. Good for adjusting slightly foggy or dark daytime photos.
Sepia effect, slightly different from the one in SimpleFilters… going to evaluate which is best.
Oil Painting effect
1 for impressionist,
100 for modern art ;)
Not a blur effect - designed to remove color noise, 'pepper noise'. Very conservative, doesn't affect edges.
Sobel energy filter
Useful only for debugging why whitespace trimmer isn't working on an image.
Note - you can also threshold the sobel filter into black and white with &a.threshold=0-255
Canny Edge Detector
Displays edges as lines. Aggressive.
This plugin (AdvancedFilters plugin ) is part of the Creative Edition
Where is the plugins section?
<plugins> section is located in Web.config, and is nested inside the
<resizer> element, which is nested inside
<configuration>. For examples, see this sample Web.config file.
Where can I find the dll?
We prefer that you install via NuGet, but you can also find the plugin DLL files in the /dlls/release folder of your download.
How do I typically install a plugin via Web.Config?
- In Visual Studio, right click on your project and choose "Add reference". Browse to the plugin DLL and click "OK".
- In the <plugins> section of Web.config, insert <add name="PluginName" />
- Look at the plugin documentation to see what configuration options (if any) are available.