|
- function onSuccess(imageURI) {
- try {
- //window.atob(imageURI);
- imageURI = "data:image/gif;base64," + imageURI;
- $('#bgImage').src = imageURI;
- imageData = imageURI;
-
- loadBgRefDiv();
- } catch (e) {
-
- }
- }
- function onFail(message) {
- return message;
- }
- var popOptions = new CameraPopoverOptions(950,32,2000,480,Camera.PopoverArrowDirection.ARROW_RIGHT);
-
- var coption = {
- quality : 50,
- destinationType : Camera.DestinationType.DATA_URL,
- /**PHOTOLIBRARY :0,//图库中获取
- *CAMERA :1,//设备照相机中获取
- *SAVEDPHOTOALBUM :2//从相册中获取*/
- sourceType : Camera.PictureSourceType.PHOTOLIBRARY,
- allowEdit : false,
- encodingType: Camera.EncodingType.JPEG,
- targetWidth: 1024,
- targetHeight: 768,
- popoverOptions: popOptions,
- saveToPhotoAlbum: false
- };
-
- navigator.camera.getPicture(onSuccess, onFail, coption);
复制代码 如题,查找了相关的资料貌似没看到解决方案,encodingType编码类型只有JPEG和PNG
|
|