Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

不兼容最新版本的ios 13 #93

Open
weboey opened this issue Oct 18, 2019 · 7 comments
Open

不兼容最新版本的ios 13 #93

weboey opened this issue Oct 18, 2019 · 7 comments

Comments

@weboey
Copy link

weboey commented Oct 18, 2019

IOS12版本此插件功能无问题,最新发布的IOS13此插件发行2个Bug
1:不选择原图,图片压缩逻辑不支持IOS,图片被压缩的很小。
2:选择原图图片不会压缩,但是图片方向去旋转了90度。

@isdotjim
Copy link

搭个车...
想邀请你们来w3c.group创建项目对应的小组。w3c.group是类似知识星球的社群工具,但却不是知识付费性质的创作者社区,这里有相关的文章:
http://t.cn/Ai1vLcCU
http://t.cn/Ai1vLcCG
http://t.cn/Ai1vLcCA

@lovelyelfpop
Copy link
Collaborator

ios 13.几?

@lovelyelfpop
Copy link
Collaborator

第一个问题,压缩逻辑我们好像没问题

@lovelyelfpop
Copy link
Collaborator

lovelyelfpop commented Oct 31, 2019

第二个问题,你应该是原图方向就是不对的,勾上“原图”不矫正原图的方向
矫正方向应该在查看图片的时候做

@kitbun
Copy link

kitbun commented Nov 9, 2019

iOS返回JSON宽度/高度为90x120
图片上传时,有时使用URI上传图片,图片为90x120。 有时图像尺寸正常。

也许,当返回JSON时,图像未完成调整大小。
需要稍等片刻,图像尺寸恢复正常。

@kitbun
Copy link

kitbun commented Nov 9, 2019

iOS:
iCloud 图片返回JSON宽度/高度为90x120
没有iCloud 图片返回JSON宽度/高度尺寸正常

@kitbun
Copy link

kitbun commented Nov 9, 2019

目前,我使用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);



},

@lovelyelfpop
Copy link
Collaborator

试下刚刚发布的 1.2.2 版本

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants