Пример #1
0
        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);
        }
Пример #2
0
        private async Task TestCam()
        {
            StorageFile filestr = await USBCam.TakePhotoAsync("maxime.jpg");

            Debug.WriteLine(string.Format("File name: {0}", filestr.Name));
        }