Partager via


IImageDecodeFilter interface

Exposes methods used to implement a custom image source handler in Windows Internet Explorer. This handler is invoked when rendering images for the IMG element's SRC attribute.

Members

The IImageDecodeFilter interface inherits from the IUnknown interface. IImageDecodeFilter also has these types of members:

  • Methods

Methods

The IImageDecodeFilter interface has these methods.

Method Description
Initialize

Called when the filter is activated by Internet Explorer.

Process

Called when a source file is ready to be processed.

Terminate

Called when the filter is deactivated.

 

Remarks

Note   Internet Explorer handles Graphics Interchange Format (GIF) and JPEG images (MIME types image/gif, image/jpeg, and image/pjpeg) differently from other image formats; it renders them internally and does not send them through the IImageDecodeFilter interface. Refer to MIME Type Detection in Internet Explorer.

 

To register the custom image handler:

  1. Create entries for the file extension and content type.

    HKEY_CLASSES_ROOT
       .myext
          (Default) = myImageType
          Content Type = my_image_type
    
  2. Create an extension mapping for the name provided in step one. The CLSID value is the same as that of the "HTML Document" type and is used to view the image in the browser.

    HKEY_CLASSES_ROOT
       myImageType
          CLSID
             (Default) = {25336920-03F9-11CF-8FD0-00AA00686F13}
    
  3. Create an entry in the MIME mapping database for the content type declared in step one. The "Image Filter CLSID" value below is the GUID of the custom IImageDecodeFilter plug-in.

    HKEY_CLASSES_ROOT
       MIME
          Database
             Content Type
                my_image_type
                   Extension = .myext
                   Image Filter CLSID = {XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}
    
  4. Finally, enter a binary array of lead bits that can used by Internet Explorer to unambiguously identify an image file and map it to the appropriate handler.

    HKEY_CLASSES_ROOT
       MIME
          Database
             Content Type
                my_image_type
                   Bits
                       = (REG_BINARY data)
    

Requirements

Minimum supported client

Windows XP

Minimum supported server

Windows 2000 Server

Header

Ocmm.h

IDL

Ocmm.idl

See also

Handling MIME Types in Internet Explorer