There isn't any way to get the pixels out of a BitmapImage (short of rendering to a new bitmap with RenderTargetBitmap). If possible, use a WriteableBitmap instead of a BitmapImage. They are both ImageSources and work essentially the same other than WriteableBitmap giving access to its PixelBuffer.
You can then get the raw pixels from the WriteableBitmap's PixelBuffer and encode them to a bitmap format (jpg, png, etc.) with a BitmapEncoder.
No comments:
Post a Comment