private async Task<StorageFile> TakePhoto()
{
StorageFile filestr = await USBCam.TakePhotoAsync("picture.jpg");
Debug.WriteLine(string.Format("File name: {0}", filestr.Name));
using (IRandomAccessStream myfileStream = await filestr.OpenAsync(FileAccessMode.Read))
{
WriteableBitmap bitmap = new WriteableBitmap(1, 1);
await bitmap.SetSourceAsync(myfileStream);
FacePhoto.Source = bitmap;
}
return filestr;
}