Training
Module
Work with medical imaging data and DICOM - Training
Learn about medical imaging data and DICOM® (Digital Imaging and Communications in Medicine) in Microsoft Cloud for Healthcare.
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
The Windows Imaging Component (WIC) provides a Component Object Model (COM) based API for use in C and C++. The WIC API exposes a variety of image-related functionality, including:
This topic contains the following topics.
The WIC APIs are defined in the following header and Interface Definition Language (IDL) files:
File | Description |
---|---|
wincodec.h | Defines C and C++ versions of the primary WIC APIs. |
wincodec.idl | Defines the primary WIC interfaces. |
wincodecsdk.h | Defines C and C++ versions of the metadata WIC APIs. |
wincodecsdk.idl | Defines the WIC metadata interfaces. |
wincodec_proxy.h | Defines the WIC proxy exports. |
To use WIC, your applications must include wincodec.h and/or wincodecsdk.h, depending on the API your application needs.
The WIC library files:
File | Description |
---|---|
windowscodecs.lib | Import library provided by the Windows Software Development Kit (SDK). |
windowscodecs.dll | Stock implementation library provided by the operating system. |
To link to WIC APIs, your application must include windowscodec.lib as an additional linker dependency.
The following table describes the two COM class factories the WIC APIs provide for creating WIC components.
Factory Interface | Description |
---|---|
IWICImagingFactory | Primary class factory for application development using WIC components. This factory creates components such as image decoders, encoders and streams. |
IWICComponentFactory | Class factory targeted for WIC component developers. Components created from this factory are primarily used in codec and metadata handler development. |
To create either class factory, use the CoCreateInstance COM function. The following example demonstrates the creation of the WIC imaging factory.
// Initialize COM
CoInitialize(NULL);
// The factory pointer
IWICImagingFactory *pFactory = NULL;
// Create the COM imaging factory
HRESULT hr = CoCreateInstance(
CLSID_WICImagingFactory,
NULL,
CLSCTX_INPROC_SERVER,
IID_PPV_ARGS(&pFactory)
);
The WIC APIs provide several types of imaging components. The following table describes some of the common WIC components. For a full list of available components, see WIC interfaces.
Component Type | Description |
---|---|
Bitmap | Represents a writable in-memory representation of an IWICBitmapSource. |
Decoder | Used to decode image data from a stream into a format that is useful for image processing. |
Encoder | Writes image data to a stream. |
Stream | Used to read and write data from a file, network resource, a block of memory, and so on. |
Format Converter | Used to convert from one pixel format to another. |
Metadata Query Reader | Used to read metadata of an image or image frame. |
Metadata Query Writer | Used to write metadata to an image or image frame. |
Training
Module
Work with medical imaging data and DICOM - Training
Learn about medical imaging data and DICOM® (Digital Imaging and Communications in Medicine) in Microsoft Cloud for Healthcare.
Documentation
WIC programming guide - Win32 apps
Describes how to use the WIC APIs.
Windows Imaging Component Overview - Win32 apps
The Windows Imaging Component (WIC) provides an extensible framework for working with images and image metadata.
Windows Imaging Component - Win32 apps
Windows Imaging Component