I\'m using a class library that generates a large ImageSource, > 3000x3750 pixels. I would like to convert this ImageSource to BitmapImage so that I can take advantage of De
The BitmapImage type inherits BitmapSource and ultimately ImageSource (both of which are abstract classes). You need to check what the actual type of your object is, i.e. check object.GetType().Name
. If you're in luck, it may actually be returning a BitmapSource
object and you will simply need to cast it to that type before being able to use it as such.
I know it's a old post, but try doing:
myBitmapImage = myImageSource as BitmapImage;
That works well.