Quantcast
Channel: WriteableBitmapEx
Viewing all articles
Browse latest Browse all 360

New Post: Bliting two WriteableBitmap with WriteableBitmapEx

$
0
0
I tried to blit two writeablebitmap. However, the debugger prompted a error message stating the followings:
The input WriteableBitmap needs to have the Pbgra32 pixel format. Use the BitmapFactory.ConvertToPbgra32Format method to automatically convert any input BitmapSource ?to the right format accepted by this class.
Here is my code.
Rect cRect =new (320,240);
WriteableBitmap _bitmap = new WriteableBitmap(320, 240, 96, 96, PixelFormats.Bgr32, null);
_bitmap.WritePixels(new Int32Rect(0, 0, 320, 240), _image, 320*240, 0);    //_image is a image stream                  
_bitmap.Blit(cRect, _imageFrame, cRect); //_imageFrame is another writeablebitmap

Viewing all articles
Browse latest Browse all 360

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>