Guest User

Untitled

a guest
Jun 23rd, 2018
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. var bgraBuffer = new byte[256 * 256 * 4];
  2. // whatever you need to do to populate the image buffer
  3. var sbm = SoftwareBitmap.CreateCopyFromBuffer(bgraBuffer.AsBuffer(), BitmapPixelFormat.Bgra8, 256, 256, BitmapAlphaMode.Premultiplied);
  4. var sbms = new SoftwareBitmapSource();
  5. var ignore_this_task_it_doesnt_matter = sbms.SetBitmapAsync(sbm);
  6. // SetBitmapAsync may still be in flight but it doesn't matter
  7. var image = Image();
  8. image.Source = sbms;
Add Comment
Please, Sign In to add comment