[UWP]在Windows应用商店应用中保存和重放图像 [英] [UWP]Save and Retrive Images in Windows Store App
问题描述
我正在开发C#windows商店应用程序,它有两个按钮。
$
第一个按钮使用fileOpenPicker并选择图像并显示到用户界面
第二个按钮,将使用CamerCaptureUi捕获图像..并在同一图像UI控件上显示照片...
$
另外我需要将图像控制中的所有图像保存到本地文件夹中。
$
任何人都可以帮我提供样品代码或一些示例将用户选择的图像和相机图片存储到Windows设备文件夹中。 谢谢你
I am developing C# windows store app which is having two buttons.
first button uses fileOpenPicker and selects an image and displays into UI
second button, will capture the image using CamerCaptureUi .. and displays the photo on the same image UI control...
Also i need to save all the images from image control into Local folder .
Can any one help me with sample code or some examples to store the User selected Images and camera picture into Windows Device folder. Thank you
推荐答案
Hello Gowrishankaran Chinnasamy,
Hello Gowrishankaran Chinnasamy,
MS官方代码示例" FilePicker "将是您想要的。这是一个UWP样本。我不确定你是否正在开发UWP应用程序。请阅读粘性
帖子,尤其是
发布指南:主题行标签和
Windows 10 SDK和工具的已知问题 并自行为标题添加标记。
The MS official code sample "FilePicker" would be that you want. This is a UWP sample. I'm not sure if you're developing UWP apps. Please read the sticky posts, especially the Guide to posting: subject line tags and Known Issues for Windows 10 SDK and Tools and add tag to title yourself.
并记录"使用Windows内置相机UI捕获照片和视频"告诉您如何使用此API捕获照片并显示照片
在图像控制中。然后你可以使用
CopyAsync "方法https://msdn.microsoft.com/library/windows/apps/br227171\">StorageFile 将此照片保存在本地文件夹中。
And document "Capture photos and video with Windows built-in camera UI" tell you how to use this API to capture photos and show photos in Image control. Then you could use "CopyAsync" method of StorageFile to save this photo in localfolder.
最好的问候,
Xavier Eoro
Xavier Eoro
这篇关于[UWP]在Windows应用商店应用中保存和重放图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!