WIC Image Viewer Using GDI Sample

This sample demonstrates the use of Windows Imaging Component (WIC) to decode an image file and Windows Graphics Device Interface (GDI) to render the image to the screen.

This topic contains the following sections.


This sample has the following requirements.

Minimum supported clientWindows 7
Windows SDKWindows Software Development Kit (SDK) for Windows 7


Downloading the Sample

This sample is available in the following locations.

Windows SDK\Program Files\Microsoft SDKs\Windows\v7.0\Samples\multimedia\wic\WICViewerGDI\
Code Galleryhttp://go.microsoft.com/fwlink/p/?linkid=153637


Building the Sample

Using Visual Studio 2008 (preferred method)

  1. Open Windows Explorer and navigate to the directory.
  2. Double-click the icon for the .sln (solution) file to open the file in Visual Studio.
  3. In the Build menu, select Build Solution. The application will be built in the default \Debug or \Release directory.

Using the Command Prompt

To build the sample by using a command prompt:

  1. Open a command prompt window and navigate to the sample directory.
  2. Type msbuild WICViewerGDI.sln

Running the Sample

After you start the application, load an image file by using the Open command of the File menu.

See Also

Microsoft Windows Imaging Codec

Programming Guide


Samples and Code Examples



Community Additions