[英]get Picture from exising camera app Windows Phone 8.1 runtime c#
I would like to call a function, the Standard camera-app of the Phone opens, the user takes a photo and i'll get some informations about tzhe photo taken. 我想调用一个函数,将打开“电话”的“标准”相机应用程序,用户拍摄照片,然后我将获得一些有关所拍摄照片的信息。
I DON'T want so write a seperate photo-app (well i have to do it in another view with Windows.Media.Capture.MediaCapture, where i want to read Barcodes, but here i just want to get a nice photo) 我不想这样写一个单独的照片应用程序(我必须在另一个视图中使用Windows.Media.Capture.MediaCapture来做,我想在这里阅读条形码,但在这里我只想获得一张漂亮的照片)
in my opinion it should work like the SpeechRecognizer, i just wait until ist finished and i have a result. 在我看来,它应该像SpeechRecognizer一样工作,我只是等到ist完成后才能得到结果。
Is there a way to do it or I am forced to write my own camera-view? 有没有办法做到这一点,还是我不得不写自己的相机视图? (It would be nice if the user would have a common look and feel of a camera on his Phone) (如果用户在手机上拥有通用的相机外观,那就太好了)
anybody knows if it's possible and how? 有人知道这是否可能吗?
regands mech 雷根斯机甲
In Windows Phone 7 and 8 you could use PhotoChooserTask but it is not longer available in Windows Phone 8.1 XAML. 在Windows Phone 7和8中,您可以使用PhotoChooserTask,但Windows Phone 8.1 XAML中不再提供该功能。 But there is a workaround for this. 但是有一个解决方法。
You can use the FileOpenPicker 您可以使用FileOpenPicker
var picker = new FileOpenPicker
{
ViewMode = PickerViewMode.Thumbnail,
SuggestedStartLocation = PickerLocationId.PicturesLibrary,
};
picker.FileTypeFilter.Add(".jpg");
picker.FileTypeFilter.Add(".jpeg");
picker.PickSingleFileAndContinue();
This will start a picker to choose a photo rom the pictures library but there is a camera button in the bottom of the UI that the user can use to take a new picture. 这将启动选择器从图片库中选择照片,但是UI底部有一个相机按钮,用户可以用来拍摄新照片。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.