简体   繁体   English

从现有的相机应用程序Windows Phone 8.1运行时C中获取图片

[英]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.

相关问题 C#Windows Phone 8.1运行时inkmanager - C# Windows Phone 8.1 Runtime inkmanager 如何从我的Windows Phone 8应用程序(XAML和C#)访问相机并将拍摄的照片保存在确定的文件夹中? - How to access the camera from my Windows Phone 8 app (XAML and C#) and save the taken picture in a determined folder? 从C#Windows Phone 8.1 App启动Cortana - Launch Cortana from C# Windows Phone 8.1 App 有没有办法从Windows Phone 8.1应用程序启动手机摄像头应用程序 - Is there a way to launch phone camera app from Windows Phone 8.1 app 在Windows Phone 8.1运行时上调用外部应用程序(非Silverlight)XAML C#应用程序 - Call an external app on windows phone 8.1 runtime(not silverlight) xaml c# application C#Windows Phone 8.1运行时:如何使任务在应用程序生命周期之外生存? - C# Windows Phone 8.1 runtime: how to make a task survive beyond app lifecycle? Windows Phone 8.1运行时应用程序无法获取TextBlock ActualWidth值 - cannot get TextBlock ActualWidth value in windows phone 8.1 runtime app 如何使用现有的相机应用程序(不是使用 MediaCapture 创建一个)并在 windows phone 8.1(WinRT) 中拍照? - How to use existing camera app(not create one using MediaCapture) and take picture in windows phone 8.1(WinRT)? 如何为C#wpf应用程序自定义Windows 8.1相机应用程序 - how to Customize windows 8.1 camera app for C# wpf application XAML和C#WebView在Windows Phone 8.1 App中不起作用 - XAML and C# WebView not working in Windows Phone 8.1 App
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM