Cyclonit
❔ Refresh WriteableBitmap
Hi,
I would like to use a WriteableBitmap in my application. However, the Image control does not update when the backing WriteableBitmap changes. The examples I could find online appear to use
WriteableBitmap.AddDirtyRect
to trigger the update. But in my case this does not nothing.
My control looks like this:
And the relevant code within the ViewModel:
9 replies
❔ load .dds to BitmapImage
Hi,
I am working on a small WPF application for a game. The game's icons are stored as
.dds
files and I need to display them on a canvas. I am familiar with loading .png
s as streams and creating a BitmapImage
from them, but I am unable to figure out how to do it with .dds
.
As far as I am aware, WPF does not support .dds
by itself. Thus I checked out some libraries and found pfim. Loading the image works fine and the data appears to make sense, but I fail at converting the Pfimage
into a BitmapImage
for WPF. The official example uses an older version of net with Bitmap
instead of BitmapImage
.
All other solutions/guides I could find are outdated too. They either use outdated libraries, versions of C# or both. Can someone help me figure out a solution to this?2 replies