I don't think you need a DataReader here at all. Try the following:
using System.Runtime.InteropServices.WindowsRuntime; // for AsBuffer() ... var file = await captureUi.CaptureFileAsync(CameraCaptureUIMode.Photo); var stream = await result.OpenForReadAsync(); byte[] data = new byte[file.Size]; await stream.ReadAsync(data.AsBuffer(), (uint)data.Length, InputStreamOptions.None);
Alternatively, you can use the AsStream() extension method (from System.IO.WindowsRuntimeStreamExtensons ) to wrap WinRT IInputStream as System.IO.Stream , and then use regular .NET methods.
source share