WIC Wrapper Library – Version 1.0

I’ve begun writing a series of wrapper classes over WIC (Windows Imaging Component) interfaces, that can easily be used in MFC, ATL, or Win32 applications without worry about directly dealing with COM interfaces.
This first version contains basic operation for loading, scaling and converting source image formats that are supported by WIC.
Download: WIC Wrapper Library.zip (535)
WIC Wrapper Library.zip archive contains the following:

    • Header files, located in \WicWrap\Include folder;
    • WicWrapDLL.dll, both Debug and Release builds, located in \WicWrap\Bin folder;
    • WicWrapDLL.lib, both Debug and Release builds, located in \WicWrap\Lib folder.

Adding WIC Wrapper Library to a project

As said before, WIC Wrapper Library can be used in MFC, ATL or Win32 projects. Here is an example shownig the steps for adding this library to an existing project:

        1. copy WicWrap folder, in the solution directory;
        2. in Solution Explorer window right-click on project name and choose the Properties menu item;
        3. choose All Configurations, go to Configuration Properties\C/C++ and add $(SolutionDir)WicWrap\Include in the Additional Include Directories field;
        4. go to Configuration Properties\Linker\Input and add WicWrapDLL.lib (also for all configurations);
        5. choose Debug configuration, go to Configuration Properties\Linker and add $(SolutionDir)WicWrap\Lib\Debug in the Additional Library Directories field;
        6. choose Release configuration, go to Configuration Properties\Linker and add $(SolutionDir)WicWrap\Lib\Release in the Additional Library Directories field
        7. copy the debug and release versions of WicWrapDLL.dll in solution Debug and Release output directories;
        8. in Solution Explorer window, right-click on project name, choose Add\Existing Item and add the WicWrap header files from \WicWrap\Include folder;
        9. include WicWrap.h in the project source code, e.g in stdafx.h .

Using WIC Wrapper Library

Next is a simple example, in an MFC program:

More details can be found in the demo application, attached below.

Demo Application

The demo application is a simple image viewer made in a simple SDI MFC project.
Download: WIC Wrapper Library Sample [1].zip (843)

WIC Wrapper Library - Sample Application

WIC Wrapper Library – Sample Application

Note: the image shown in the sample application is taken from SoftIcons.com site.

WIC-related articles and resources

Leave a Reply