Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var bgraBuffer = new byte[256 * 256 * 4];
- // whatever you need to do to populate the image buffer
- var sbm = SoftwareBitmap.CreateCopyFromBuffer(bgraBuffer.AsBuffer(), BitmapPixelFormat.Bgra8, 256, 256, BitmapAlphaMode.Premultiplied);
- var sbms = new SoftwareBitmapSource();
- var ignore_this_task_it_doesnt_matter = sbms.SetBitmapAsync(sbm);
- // SetBitmapAsync may still be in flight but it doesn't matter
- var image = Image();
- image.Source = sbms;
Add Comment
Please, Sign In to add comment