Reputation: 4741
How to get BitmapSource from BitmapImage? Or how to convert BitmapImage to BitmapFrame directly? It seems to me that if I have BitmapSource I could use BitmapFrame.Create and finally get BitmapFrame object from given BitmapImage
Upvotes: 5
Views: 10905
Reputation: 2171
The BitmapImage inherits from BitmapSource as parapura said.
Example:
BitmapSource bitmapSource = new BitmapImage();
BitmapImage bitmapImage = bitmapSource as BitmapImage;
Source: BitmapSource MSDN
Upvotes: 1
Reputation: 24423
A BitmapImage inherits from BitmapSource so no conversion is needed
Upvotes: 12