Send comments on this topic. | Back to Introduction - All Topics | Help Version 15.03.27
Registering the LEAD WIC-Enabled Codecs
See Also

The LEAD WIC Enabled Codecs are implemented as a COM object in the dynamic link library LeadCodec.dll.  The codecs can be registered from the command line using the regsvr32.exe utility, or by using the LeadCodecRegister.exe utility.

Registering with regsvr32.exe
Open a command box, and go to the directory where the LeadCodec.dll library is located.  In the same directory, there is a file named LeadCodec.dll.config that is used to configure how the LEAD WIC-Enabled Codec is registered.   This is an XML file that specifies all the supported LEAD WIC Enabled Codecs.  There is one line for each supported codec.  For example, for the LEAD Png Codec, the entry looks like this:

<Format Decoder="False" Encoder="False" Icon="False" Thumbnail="False" PhotoGallery="False" Description="Portable Network Graphics Format">Png</Format>

The table below summarizes the meaning of each attribute:

Attribute Meaning
Decoder Yes: Register this format for loading.
No: Do not register this format for loading.
Encoder Yes: Register this format for saving.
No: Do not register this format for saving.
Icon Yes: Display one of the LEAD Icons for this format (in Windows Explorer)<.br /> No: Do not display a LEAD icon for this format.
Thumbnail Yes: Generate a thumbnail preview for this format (in Windows Explorer).
No: Do not generate a thumbnail preview.
PhotoGallery Yes: Register this format to open in Windows Vista PhotoGallery.
No: Do not register this format to open in Windows Vista PhotoGallery.

Note: After registering a codec to open in Windows Vista PhotoGallery, you may need to reboot your computer for this to take effect.
Description Description of codec.  This does not affect registration.

 

Registering with the LeadCodecRegister.exe utility
This is the preferable way to register the LEAD WIC-Enabled Codec.  LeadCodecRegister.exe is located in the same directory as the LeadCodec.dll.  Run LeadCodecRegister.exe and the following will be displayed.  To save any changes, choose File->Save. Select/clear the appropriate check boxes and from the menu choose Register->Register LeadCodec.dll to register the LEAD WIC- Enabled Codec.  Note: Choosing Register->Register LeadCodec.dll will also save your changes to the LeadCodec.dll.config XML file.

NOTE: You are not licensed to redistribute the LeadCodecRegister.EXE utility. You may NOT redistribute this utility.

Note that right-clicking a row will display the following popup menu to make it easier to select rows.  You can also drag the mouse to select a group of check boxes, and then choose "Check Selected" from the popup menu.

 

Note: Registering some of the LEAD WIC Codecs can have undesired effects on applications that were written to use the Microsoft .Net WIC codec classes. This is a known bug in the Microsoft .Net runtime. The following list shows the LEAD WIC Codecs and the affected Microsoft .Net classes:

LEAD WIC Codec Microsoft .Net Class
LEAD Bmp Decoder System.Windows.Media.Imaging.BmpBitmapDecoder
LEAD Gif Decoder System.Windows.Media.Imaging.GifBitmapDecoder
LEAD Icon Decoder System.Windows.Media.Imaging.IconBitmapDecoder
LEAD Jpeg Decoder System.Windows.Media.Imaging.JpegBitmapDecoder
LEAD Png Decoder System.Windows.Media.Imaging.PngBitmapDecoder
LEAD Tiff Decoder System.Windows.Media.Imaging.TiffBitmapDecoder
LEAD Hdp Decoder System.Windows.Media.Imaging.WmpBitmapDecoder

The following code illustrates the problem and shows how to work around this issue:


//You cannot use TiffBitmapDecoder if the LEAD WIC Tiff Decoder is registered.
//This is a bug in the .Net runtime.
TiffBitmapDecoder decoder = new BitmapDecoder(uri, BitmapCreateOptions.None, BitmapCacheOption.Default);

//You can work around this by using the static Create method
BitmapDecoder decoder = BitmapDecoder.Create(stream, BitmapCreateOptions.None, BitmapCacheOption.Default);