By registering your LEAD WIC-Enabled Codecs, applications that support WIC and WPF (like Vista Photo Explorer) will automatically have access to over forty image file formats. And, when using the Windows Explorer thumbnail view, users will see an actual thumbnail image for all of these file formats, instead of a generic icon.
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);
- Install the required LEAD libraries in the Global Assembly Cache (GAC) by dragging them to the GAC location (typically c:\windows\assembly), or by using a utility like gacutil.exe (the .NET utilty used to work with the GAC).
- Register the LEAD WIC-Enabled Codecs that you want to use.
The LEAD WIC-Enabled Codec is a COM object that supports standard WIC codecs interfaces. The LEAD CLeadBitmapDecoder is the class that implements the LEAD Bitmap decoders. The LEAD CLeadBitmapEncoder is the class that implements the LEAD Bitmap Encoders. A summary of the interfaces implemented by these classes is given below:
CLeadBitmapDecoder Implemented Interfaces |
---|
IWICBitmapFrameDecode |
IWICBitmapDecoder |
IWICBitmapCodecProgressNotification |
IWICMetadataBlockReader |
IThumbnailProvider |
IInitializeWithStream |
CLeadBitmapEncoder Implemented Interfaces |
---|
IWICBitmapEncoder |
IWICBitmapFrameEncode |
IWICLeadBitmapEncoder |
The source code for LeadCodecDemo_Original.exe is installed as part of the toolkit. It is written in C++, and shows how to program with the LeadCodec.dll COM object directly. The LeadCodecDemo_Original.exe can do the following:
- Display all WIC decoders and encoders that are registered on your system.
- Display the property bag items of all encoders on your system.
- Open and display image files using any of the codecs registered on your system. The log shows detailed information about the decoder used.
- Save image files using any of the codecs registered on your system. When choosing one of the LEAD Encoders, the IWICLeadBitmapEncoder interface is used to show detailed options in the file save dialog.
LEAD WIC Enabled Codecs Tutorials show how to programmatically work with the LEAD WIC Enabled Codecs, as well as any other codecs that are registered on your system.
Programming Reference
TutorialsFiles to be Included with Your Application
Example Requirements
LEAD WIC-Enabled File Formats
IWICLeadBitmapEncoderInterface Members
WICLead Enumerations
Reference
Introduction to LEAD WIC-Enabled CodecsIntroduction to LEADTOOLS for WPF
Windows Imaging Component
Licensing Requirements
Registering LEAD WIC-Enabled Codecs
Technical Support
WPF Assemblies
Leadtools.Windows.Media.EffectsLeadtools.Windows.Controls