I implemented an Internet Explorer browser plugin (C++ based ATL COM) a while back as hobby which did following:
1. The Browser plugin is an ActiveX object that registers with Windows to capture a custom image MIME type (by creating a custom image extension registry key). The registration associates the plugin's CLSID with given MIME type in windows registry such that the right plugin can be invoked on encountering the custom MIME.
2. Implements IImageDecodeFilter Interface to handle the image source.This handler is invoked when rendering the images for HTML IMG element's SRC attribute.
The interface has following methods that has to be implemented
Initialize - Is called when the plugin is loaded and initialized. Creates an IImageDecodeFilter instance based on CLSID, and call Initialize of that instance to make sure that MIME image stream is available when 'process' is invoked.
Process - Is called when the MIME type is captured. Gets the image stream, load the contents in memory and processes it.
Terminate - Is called when the filter is deactivated. All the temp objects are cleaned-up here.
<still to come....>