c# - Bliting two WriteableBitmap with WriteableBitmapEx -


i tried blit 2 writeablebitmap. however, debugger prompted error message stating followings:

the input writeablebitmap needs have pbgra32 pixel format. use bitmapfactory.converttopbgra32format method automatically convert input bitmapsource ?to right format accepted class.

here 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 image stream                   _bitmap.blit(crect, _imageframe, crect); //_imageframe writeablebitmap 

actually _imageframe writeablebitmap canvas change content @ regular time. there more effective way blit writeablebitmap , canvas?

can change line:

writeablebitmap _bitmap = new writeablebitmap(320, 240, 96, 96, pixelformats.pbgra32, null); 

and similiar on _imageframe writeablebitmap


Comments

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -