|
[BUG]
getPictuer和FNImageClip的bug
[复制链接]
我同时用的这两个控件,代码如下,结果却是这样,图片清晰度差异很大,不知是我写法问题,还是bug,小图看起来还好点,但是图片大时,就很明显了,尤其是带文字的图片
$("#dakaixiangce").click(function() {
//打开相册
api.getPicture({
sourceType : 'library',
encodingType : 'jpg',
mediaValue : 'pic',
destinationType : 'base64',
allowEdit : true,
quality : 100,
targetWidth : 100,
targetHeight : 100,
saveToPhotoAlbum : false
}, function(ret, err) {
if (ret) {
//截取
FNImageClip = api.require('FNImageClip');
FNImageClip.open({
rect : {
x : 0,
y : document.querySelector('.main').offsetHeight,
w : api.winWidth,
h : api.winHeight - document.querySelector('.main').offsetHeight
},
srcPath : ret.data,
style : {
mask : '#888',
clip : {
w : 100,
h : 100,
x : 50,
y : 50,
borderColor : '#0f0',
borderWidth : 1,
appearance : 'rectangle'
}
}
}, function(ret, err) {
if (ret) {
alert(JSON.stringify(ret));
} else {
alert(JSON.stringify(err));
}
});
} else {
alert(JSON.stringify(err));
}
});
})
原图
截取时图片
|
|