Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

System.NotSupportedException When Rendering Images in WPF Application


View products that this article applies to.

Symptoms

When running a .NET 3.x or 4.x WPF based application on a specific computer, attempting to render any image fails with the following exception and call stack.

System.NotSupportedException: No imaging component suitable to complete this operation was found.

at System.Windows.Media.Imaging.BitmapDecoder.SetupDecoderFromUriOrStream()
at System.Windows.Media.Imaging.BitmapDecoder.CreateFromUriOrStream()
at System.Windows.Media.Imaging.BitmapFrame.CreateFromUriOrStream()
at Sstem.Windows.Media.ImageSourceConverter.ConvertFrom()
at System.ComponentModel.TypeConverter.ConvertFromString()
at System.Windows.Markup.XamlTypeMapper.ParseProperty() 

This occurs in any simple WPF application attempting to render the same image type.

↑ Back to the top


Cause

The Windows Imaging Component (WIC) installation is damaged on the computer(s) exhibiting the problem.

↑ Back to the top


Resolution

On Windows XP and Windows Server 2003 computers, you may be able to resolve this problem by installing the standalone WIC redistributable from the following download site. Windows Imaging Component For Windows Vista and later operating systems, try repairing the operating system installation. 

↑ Back to the top


More Information

The WPF imaging stack is dependent upon the Windows Imaging Component (WIC) on the operating system. If any simple WPF application encounters this exception when rendering the same image(s), then it is likely because the WIC installation is damaged on the operating system. On Windows XP and Windows Server 2003, the Windows Imaging Component is not part of the core operating system and will be installed by the .NET Framework installation. On Windows Vista and later operating systems, the operating system includes WIC. 

↑ Back to the top


Keywords: kb

↑ Back to the top

Article Info
Article ID : 2771290
Revision : 1
Created on : 1/7/2017
Published on : 10/19/2012
Exists online : False
Views : 799