cordova-plugin-ImagePicker
cordova-plugin-ImagePicker copied to clipboard
不兼容最新版本的ios 13
IOS12版本此插件功能无问题,最新发布的IOS13此插件发行2个Bug 1:不选择原图,图片压缩逻辑不支持IOS,图片被压缩的很小。 2:选择原图图片不会压缩,但是图片方向去旋转了90度。
搭个车... 想邀请你们来w3c.group创建项目对应的小组。w3c.group是类似知识星球的社群工具,但却不是知识付费性质的创作者社区,这里有相关的文章: http://t.cn/Ai1vLcCU http://t.cn/Ai1vLcCG http://t.cn/Ai1vLcCA
ios 13.几?
第一个问题,压缩逻辑我们好像没问题
第二个问题,你应该是原图方向就是不对的,勾上“原图”不矫正原图的方向 矫正方向应该在查看图片的时候做
iOS返回JSON宽度/高度为90x120 图片上传时,有时使用URI上传图片,图片为90x120。 有时图像尺寸正常。
也许,当返回JSON时,图像未完成调整大小。 需要稍等片刻,图像尺寸恢复正常。
iOS: iCloud 图片返回JSON宽度/高度为90x120 没有iCloud 图片返回JSON宽度/高度尺寸正常
目前,我使用JS每2秒检查一次图像大小以解决问题 希望您可以尽快解决iOS插件问题
preloadAllPhoto() {
if ($this.preloadUris.length == 0) {
$this.uploadAllPhoto();
return;
}
function loadPhoto() {
var loadCount = 0;
for (var i=0; i< $this.preloadUris.length; i++) {
var uri = $this.preloadUris[i];
var img = new Image();
img.onload = function() {
console.log(this.width + 'x' + this.height);
if (this.width > 120 || this.height > 120) {
loadCount++;
if (loadCount >= $this.preloadUris.length) {
clearInterval(loadPhotoInterval);
$this.uploadAllPhoto();
}
}
};
img.src = uri;
}
}
var count = 0;
loadPhoto();
var loadPhotoInterval = setInterval(function() {
loadPhoto();
count++;
if (count > 30) { // timeout
clearInterval(loadPhotoInterval);
$this.uploadAllPhoto();
}
}, 2000);
},
试下刚刚发布的 1.2.2 版本