TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
C# Corner
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
How to Convert RenderTargetBitmap to WriteableBitmap
Charwaka Thupili
Nov 13
2015
Code
5
k
0
0
facebook
twitter
linkedIn
Reddit
WhatsApp
Email
Bookmark
expand
var bitmap =
new
RenderTargetBitmap();
await bitmap.RenderAsync(Cam);
//Cam is your Gird
var pixelBuffer = await bitmap.GetPixelsAsync();
byte
[] pixels = pixelBuffer.ToArray();
var wb =
new
WriteableBitmap((
int
) bitmap.PixelWidth, (
int
) bitmap.PixelHeight);
using
(Stream stream = wb.PixelBuffer.AsStream())
{
await stream.WriteAsync(pixels, 0, pixels.Length);
}
RenderTargetBitmap
WriteableBitmap
Convert RenderTargetBitmap to WriteableBitmap
windows 10
winrt
windows phone 8.1