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
2 Answers
A BitmapImage inherits from BitmapSource so no conversion is needed
2 Comments
curiousity
If I write ImageFrame im = ImageFrame.Create(bitmapImage); this cause error
curiousity
Sorry, I have make a mistake. Thank for the answer))
The BitmapImage inherits from BitmapSource as parapura said.
Example:
BitmapSource bitmapSource = new BitmapImage();
BitmapImage bitmapImage = bitmapSource as BitmapImage;
Source: BitmapSource MSDN