【发布时间】:2013-09-25 13:16:14
【问题描述】:
我目前正在使用以下函数从照片库中获取图像
function getImage() {
// Retrieve image file location from specified source
navigator.camera.getPicture(updatePhoto, function(message) {
alert('get picture failed');
},{
quality: 50,
destinationType: navigator.camera.DestinationType.FILE_URI,
sourceType: navigator.camera.PictureSourceType.PHOTOLIBRARY
}
);
}
function updatePhoto(imageURI) {
//console.log(imageURI);
}
但现在我想要 base64 字符串而不是图像 URL!
如何做到这一点?
【问题讨论】: