使用Cordova/Phonegap保存从手​​机摄像头拍摄的图像Windows Phone 7 [英] Using Cordova/Phonegap to save an image taken from the phone camera Windows Phone 7

查看:86
本文介绍了使用Cordova/Phonegap保存从手​​机摄像头拍摄的图像Windows Phone 7的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Visual Studio 2010和Windows Phone 7模拟器来创建一个应用程序,该应用程序允许用户拍摄照片,然后将其保存到文件系统上的文件夹中,并在数据库中创建对它的引用这样数据库中的所有图像都可以显示在应用程序上.但是,我无法保存相机拍摄的图像,我花了很长时间浏览Cordova文档和其他网站.好像我需要相机拍摄的图像的文件位置,但是我无法打开consol.log,我已经通过注册表编辑器浏览,无法显示它.我喜欢一个示例,它将向我展示如何获取相机图像并将其保存到本地存储或创建副本以将其保存到文件夹中. 预先感谢

I am using Visual Studio 2010 and the Windows Phone 7 Emulator in order to create an app which allows the user to take a photo and then save it into a folder on the file system and also create a reference of it on the database so as all of the images on the database can be displayed on the app. I can't however save the Image that is taken by the camera, I have spent ages looking through the Cordova docs and other websites. It looks as if I need the file location of the image taken by the camera but I cannot get the consol.log to open, I have been through my Registry Editor and I cannot get it to display. I would love an example which would show me how to get the camera image and either save it to localstorage or create a copy in order to save it into a folder. Thanks in advance

推荐答案

将FILE_URI用于Camera.DestinationType选项.它将捕获的图像存储在设备的图像库中.

Use FILE_URI for Camera.DestinationType option. It will make the image captured stored in the device's image gallery.

参考: http://docs.phonegap.com/zh/2.6.0/cordova_camera_camera.md.html#cameraOptions

这篇关于使用Cordova/Phonegap保存从手​​机摄像头拍摄的图像Windows Phone 7的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆