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

The Windows Imaging Component (WIC) framework, provided with Windows Vista (and later) and Windows XP Service Pack 3, provides a single, common set of APIs that allow developers to create applications that process images, with no prior knowledge of the specific image formats required. Once an image format codec is written for WIC, and installed on a machine that supports WIC, you get system-wide support for that format in all applications that use WIC or WPF. This means that any application using WIC can access, display, process, save, and print images using a consistent interface for all image file formats.

LEAD has done the work of writing WIC codecs for you. The LEAD WIC-Enabled Codec set provides you with over forty image encoders and decoders that integrate seamlessly with the Windows Imaging Component (WIC) framework.

By registering these, 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 bug occurs when you register a decoder that has a higher precedence than the corresponding Microsoft decoder. Internally the TiffBitmapDecoder class creates a BitmapDecoder from the input file (or Stream), and then throws an exception if the container CLSID of the BitmapDecoder is not the expected Microsoft container CLSID (GUID_ContainerFormatTiff). 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 TiffBitmapDecoder(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);

Key Features

Supported Environments

LeadCodec.dll comes in Win32 and x64 editions that can support development of software applications for any of the following environments:

Note that in order for a WPF application to run, Microsoft .Net Framework 3.0 must be installed on the client. Internet Explorer 7 can auto-detect whether Framework is installed under certain conditions. For more information, refer to Deploying a WPF Application (WPF).

See Also