Yes, you can load it as IStream, then convert it to WIC, like in this sample I had posted with a GIF : How to define a GIF image in resource file?
How can I use resource file and embed a .jpg file to output executable?

thebluetropics
1,046
Reputation points
My purpose is to be able to embed a .jpg
file into the program executable in Visual Studio 2022, then I can use it with Direct2D using WIC.
I have zero experience of using .rc
file. But I have tried to work with resource files using Visual Studio's resource editor, or whatever that called.
I prefer to manual writing of .rc
file instead using managed tools...
I have background.jpg
in my project folder, will this code work?
resource.rc
BackgroundImage Image "background.jpg"
Edit: I got this:
Windows development Windows API - Win32
2,782 questions
Developer technologies C++
3,972 questions
Developer technologies Visual Studio Other
5,451 questions