Given that you're working with WIC classes (eg. BitmapDecoder
and BitmapSource
), you'll want to avoid anything involving the System::Drawing
namespace which is all old-school GDI. Either make no reference to those namespaces in your using
directives, or explicitly use the whole System::Windows::Media
namespace.
The specific Image
class you're after is probably System::Windows::Controls::Image
(docs here).
You'll need to add a reference to the WIC wrappers and a few supporting assemblies in your project in order to link to the appropriate DLLs.
- PresentationCore has all of the main image codecs and manipulation classes that you want, this is mentioned in the
JpegBitmapDecoder
documentation. - WindowsBase is needed for a few additional dependencies used by the WIC wrappers (
Freezable
andDispatcherObject
). - System.Xaml may also arise as a dependency... in a WIC-using C# project I have here, building without that assembly generates an error due to the absense of
System.Windows.Markup.IUriContext
. This may be an artefact of my use of the WIC assemblies, however (but I certainly make no use of Xaml nor IUriContext). - PresentationFramework provides the
Image
class and its dependencies, as mentioned in the appropriate documentation