甜甜爸
甜甜爸
  • 发布:2015-11-30 12:47
  • 更新:2015-11-30 12:47
  • 阅读:1532

Bitmap save 无回调?版本1.9.8(最新)

分类:Native.js
var bitmap = new plus.nativeObj.Bitmap("bighead");  
            bitmap.load(s,function(){  
                console.log("bitmap load suc");  
                bitmap.save("_user/bighead.jpg",{overwrite:true,format:"jpg",quality:100},  
                function(event){  
                    alert("eeee");  
                    var target = event.target;  
                    var width = event.width; // 保存后图片的实际宽度,单位为px  
                    var height = event.height; // 保存后图片的实际高度,单位为px  
                    //裁剪  
                    mui.openWindow({  
                        url: '/User/SelectHead.html',  
                        id: 'SelectHead',  
                        extras:{  
                            headsrc:target,  
                            realwidth:width,  
                            realheight:height  
                        },  
                        show: {  
                            aniShow: 'pop-in'  
                        }  
                    });  
                    bitmap.clear();  
                },  
                function(exc){  
                    console.log("save Bitmap error"+exc.message+" "+exc.code);  
                });  
            },function(ex){  
                console.log("load Bitmap error"+ex.message);  
            });

load那可以输出日志。保存成功的回调处,alert不出来。也没有报错。

2015-11-30 12:47 负责人:无 分享
已邀请:

该问题目前已经被锁定, 无法添加新回复