-
Notifications
You must be signed in to change notification settings - Fork 80
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
IOS14.0.1微信小程序选择照片,不显示图片。 #28
Comments
貌似小程序内核升级造成的,尺寸太大的图片会有问题,可以先在index.js的load函数的wx.getImageInfo回调里,把图片尺寸缩小一半。 |
@KanadeCCCC 方便给个代码片段吗? |
|
嗯嗯,这个组件在图片尺寸和体积很大的时候是会问题,示例小程序里边都限制了不能选取原图
…---原始邮件---
发件人: "CLC KANADE"<[email protected]>
发送时间: 2020年10月14日(周三) 下午5:46
收件人: "newbieYoung/Simple-Crop"<[email protected]>;
抄送: "Mention"<[email protected]>;"Young"<[email protected]>;
主题: Re: [newbieYoung/Simple-Crop] IOS14.0.1微信小程序选择照片,不显示图片。 (#28)
貌似小程序内核升级造成的,尺寸太大的图片会有问题,可以先在index.js的load函数的wx.getImageInfo回调里,把图片尺寸缩小一半。
res.width=Math.round(res.width/2)
res.height=Math.round(res.height/2)
@newbieYoung
通过这个方式成功解决了问题,不过这算是妥协方案了,图片清晰度要降低不少。
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
@newbieYoung |
@liangzq1 你试用下 simplecrop 小程序也会有问题吗? |
@liangzq1 麻烦告诉下设备和图片信息 |
@newbieYoung 手机iphone7 Plus 系统为IOS10.2 ,图片原图为1920*1080,大小为399KB,在编辑器可以正常显示,真机无法显示。 |
我这边,是IOS 14.3(XS) 也是不好用,然后使用楼上的方法,IOS就好用了 res.width=Math.round(res.width/2) |
貌似小程序内核升级造成的,尺寸太大的图片会有问题,可以先在index.js的load函数的wx.getImageInfo回调里,把图片尺寸缩小一半。 |
iOS 14.2, iPhone 12 mini 也无法正常工作! 说下我遇到的问题的解决办法, 使用tempFiles对象中的path属性, 而不是使用tempFilePaths, 因为iOS的image不能加载微信的wxfile://协议引用的tmp临时文件 |
现在 我看tempFilePaths 和 tempFiles 中都是返回的 wxfile://协议引用的tmp临时文件 |
您好,您所发的电子邮件已经安全投递至本人邮箱,请等待本人查收后回复。
|
微信开发者工具可以显示,但部分真机无法显示,不显示的机型包括: iphone xs, iphone11 pro max,反复测试后,不管是杀死微信还是移除小程序,安卓与ios均会出现拍照后上传图片至组件,回调函数不被调用。以上问题均未出现任何报错与错误日志,望解决
The text was updated successfully, but these errors were encountered: