|
楼主可以改cordova获取图片后返回类型,你可以将返回的类型为图片url改为图片为base64,base64显示就很好处理了。
//类型说明
DestinationType:{
DATA_URL: 0, // Return base64 encoded string
FILE_URI: 1, // Return file uri (content://media/external/images/media/2 for Android)
NATIVE_URI: 2 // Return native uri (eg. asset-library://... for iOS)
},
cordova的配置
navigator.camera.getPicture(onPhotoDone, onPhotoFail, { quality: 100, targetWidth: 150, targetHeight: 150, destinationType: navigator.camera.DestinationType.DATA_URL
,sourceType: navigator.camera.PictureSourceType.SAVEDPHOTOALBUM }); |
|