帖子
帖子
用户
博客
课程
12345
返回列表 发新帖
0
帖子
0
勋章
110
Y币
这个比较常用,必须定!
0
帖子
0
勋章
27
Y币
必须顶,谢谢分享
0
帖子
0
勋章
3
Y币
顶一下帖子
15
帖子
0
勋章
94
Y币
文件不存在。。。
14
帖子
3
勋章
2万+
Y币
留名,明天来看看。
6
帖子
0
勋章
76
Y币
我用getPicture+imageClip,截取图片的时候,图片很模糊,逸天和各位大师看下怎么回事
function getNewPic() {
    api.getPicture({
        sourceType: 'library',
        encodingType: 'jpg',
        mediaValue: 'pic',
        destinationType: 'url',
        allowEdit: true,
        quality: 100,
        targetWidth: 100,
        targetHeight: 100,
        saveToPhotoAlbum: false
    }, function (ret, err) {
        if (ret && ret.data != '') {
            var imageClip = api.require('imageClip');
            imageClip.open({
                    path: ret.data,
                    clipRect: {
                        x: 20,
                        y: 120,
                        w: 300,
                        h: 300
                    }
                },
                function (ret, err) {
                    if (ret.status) {
                        //功能frame控制保存和关闭功能
                        api.openFrame({
                            name: 'modify_user_save_img',
                            url: '../../html/login/saveImg.html',
                            rect: {
                                x: 20,
                                y: 10,
                                w: 60,
                                h: 35
                            },
                            bounces: false,
                            opaque: false,
                            bgColor: 'rgba(0,0,0,0.0)'
                        });

                        api.openFrame({
                            name: 'modify_user_close_img',
                            url: '../../html/login/closeImg.html',
                            rect: {
                                x: window.innerWidth - 80,
                                y: 10,
                                w: 60,
                                h: 35
                            },
                            bounces: false,
                            opaque: false,
                            bgColor: 'rgba(0,0,0,0.0)'
                        });
                    } else {
                        alert(JSON.stringify(err));
                    }
                });

        } else {
           // api.alert({msg: err.msg});
        }
    });
}
22
帖子
0
勋章
4493
Y币
顶一个
2
帖子
0
勋章
559
Y币
可以滴!
18
帖子
0
勋章
230
Y币
辛苦了。
4
帖子
0
勋章
252
Y币
谢谢,您的鼓励将会是我的动力
12345
您需要登录后才可以回帖 登录

本版积分规则