Convert the image to a byte array
How to convert the picture into a byte array? Found an example, when a
file is open:
using (IRandomAccessStreamWithContentType stream = await
photo.OpenReadAsync())
{
bytes = new byte[stream.Size];
var reader = new DataReader(stream.GetInputStreamAt(0));
await reader.LoadAsync((uint)stream.Size);
reader.ReadBytes(bytes);
}
My image is generated in software, what can I do? Thanks!
No comments:
Post a Comment