5

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

1

2 Answers 2

12

A BitmapImage inherits from BitmapSource so no conversion is needed

Sign up to request clarification or add additional context in comments.

2 Comments

If I write ImageFrame im = ImageFrame.Create(bitmapImage); this cause error
Sorry, I have make a mistake. Thank for the answer))
1

The BitmapImage inherits from BitmapSource as parapura said.

Example:

BitmapSource bitmapSource = new BitmapImage();
BitmapImage bitmapImage = bitmapSource as BitmapImage;

Source: BitmapSource MSDN

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.