The goal of the v3 rewrite was to make everything open and extensible. V2 was a monolithic design that, while elegant and very concise, was hard to extend except through source code modification.
V3 introduces the concept of Plugins, while adding an array of Events that can be used to customize the behavior of the pipeline. It also introduces a dedicated configuration section for the Resizer and its plugins, which is freeform and easily queried with a CSS-like syntax through the Config.Current class.
- Modify caching behavior or implement new kinds of persistent caches (ICache)
- Modify http headers
- Modify the behavior of image processing (40+ methods to override, with XML documentation)
- Implement new visual effects, add watermarks or new functionality
- Perform URL rewriting or query string expansion by registering an event handler
- Add support for new image formats
- Add support for new image output formats (IEncoder)
- Apply advanced security rules
- Provide virtualized access to images on an abnormal data source (See Making an IVirtualImageProvider)
- IPlugin - Implement this to allow addition and removal of the plugin via webconfig.
- ICache - Implement this to create an alternate caching system
- IEncoder - Implement this to modify how images are encoded into binary streams (For example, adding or improving an output format)
- IQuerystringPlugin - Always implement this if your plugin accepts querystring arguments
- IFileExtensionPlugin - Implement this if your plugin adds support for new file types
- IMultiInstancePlugin - Indicates your plugin supports multiple instances
- ISettingsModifier - Allows a plugin to modify settings specified by either the managed or URL API
- IVirtualImageProvider - Implement to provide virtualized image access or tie into an alternate data store more…
- IVirtualFile - Your IVirtualImageProvider returns instances of this
- IVirtualBitmapFile - Implement this if you are building a VirtualPathProvider that produces bitmap files (No need unless your VPP modifies or generates images)
- IVirtualFileWithModifiedDate - Your VirtualFile instances should implement this so the caching system can detect changes to source files
Inherit from this class if you want to interact with image layout and rendering. Includes 40+ override-able methods for modifying every part of the processing pipeline. You'll also need to implement IPlugin (and possibly IQuerystringPlugin.
- Support new source image formats by overriding PreLoadImage and/or LoadImageFailed
- Add new effects with LayoutEffect and RenderEffect
- Do custom watermarking with RenderOverlays