【发布时间】:2014-09-12 15:53:57
【问题描述】:
我正在使用 phonegap 创建 android 应用程序。因为我需要从 gallery 捕获图像。所以我写了以下代码来捕获图像
navigator.camera.getPicture(function(imageURI){
window.resolveLocalFileSystemURI(imageURI, function(fileEntry){
fileEntry.file(function(fileObj) {
console.log(fileObj.name);
});
}, fail);
}, fail, { quality: 100, allowEdit : true,
targetWidth: 600,
targetHeight: 600,
destinationType: destinationType.NATIVE_URI,
sourceType: pictureSource.PHOTOLIBRARY
});
它工作正常并捕获图像。
问题是在相机选项中插入 allowEdit 时,图像名称已更改。如果我删除了
/*allowEdit : true,
targetWidth: 600,
targetHeight: 600,*/
默认图片名称是persist。
如何编辑时避免重命名。有人帮助解决这个问题。
【问题讨论】:
-
编辑后图像保存在哪里@Ela
-
@Sport 保存在我的 SD 卡中,例如 appname/files/myimage.jpg