How to convert CroppedBitmap to BitmapImage

I am trying to convert CroppedBitmap to BitmapImage * EDIT: without using memystream. *

I tried to directly convert it, it seems that this is not an option. It should not be so difficult.

I am trying to cut a portion of BitmapImage and create a BitmapImage that contains only the new cropped Bitmap.

+4
source share
2 answers

It would seem that BitmapImage is a specialized version of BitmapSource (which is CroppedBitmap). You can easily convert from image to source, but not vice versa.

This answer probably works, although I have never considered it.

BitmapSource for BitmapImage

, BitmapImages BitmapSources. - . , .

+2

Bitmap bm = ( ); , bm.Save( , );

0

All Articles