コード例 #1
0
ファイル: FollowFace.cs プロジェクト: maniSbindra/BrickPi-1
        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
ファイル: TestUSBCam.cs プロジェクト: maniSbindra/BrickPi-1
        private async Task TestCam()
        {
            StorageFile filestr = await USBCam.TakePhotoAsync("maxime.jpg");

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