Comments (14)
貌似小程序内核升级造成的,尺寸太大的图片会有问题,可以先在index.js的load函数的wx.getImageInfo回调里,把图片尺寸缩小一半。
res.width=Math.round(res.width/2)
res.height=Math.round(res.height/2)
from simple-crop.
@KanadeCCCC 方便给个代码片段吗?
from simple-crop.
貌似小程序内核升级造成的,尺寸太大的图片会有问题,可以先在index.js的load函数的wx.getImageInfo回调里,把图片尺寸缩小一半。
res.width=Math.round(res.width/2)
res.height=Math.round(res.height/2)
@newbieYoung
通过这个方式成功解决了问题,不过这算是妥协方案了,图片清晰度要降低不少。
from simple-crop.
from simple-crop.
嗯嗯,这个组件在图片尺寸和体积很大的时候是会问题,示例小程序里边都限制了不能选取原图
…
---原始邮件--- 发件人: "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
我IOS不选原图也显示不了阿,请问有其他办法解决吗?
from simple-crop.
@liangzq1 你试用下 simplecrop 小程序也会有问题吗?
from simple-crop.
@liangzq1 你试用下 simplecrop 小程序也会有问题吗?
@nonzar 貌似小程序内核升级造成的,尺寸太大的图片会有问题,可以先在index.js的load函数的wx.getImageInfo回调里,把图片尺寸缩小一半。
res.width=Math.round(res.width/2)
res.height=Math.round(res.height/2)
用的就是simpleCrop阿,即使不是原图,图片尺寸太大也会显示不出来,我也是通过上面的这种方式解决了,不过把图片尺寸缩小会影响清晰度,能有其他解决办法吗?
from simple-crop.
@liangzq1 麻烦告诉下设备和图片信息
from simple-crop.
@liangzq1 麻烦告诉下设备和图片信息
@newbieYoung 手机iphone7 Plus 系统为IOS10.2 ,图片原图为1920*1080,大小为399KB,在编辑器可以正常显示,真机无法显示。
from simple-crop.
我这边,是IOS 14.3(XS) 也是不好用,然后使用楼上的方法,IOS就好用了
res.width=Math.round(res.width/2)
res.height=Math.round(res.height/2)
from simple-crop.
貌似小程序内核升级造成的,尺寸太大的图片会有问题,可以先在index.js的load函数的wx.getImageInfo回调里,把图片尺寸缩小一半。
res.width=Math.round(res.width/2)
res.height=Math.round(res.height/2)
@newbieYoung
通过这个方式成功解决了问题,不过这算是妥协方案了,图片清晰度要降低不少。
@newbieYoung
清晰度这个问题能修复吗?
from simple-crop.
iOS 14.2, iPhone 12 mini 也无法正常工作!
说下我遇到的问题的解决办法, 使用tempFiles对象中的path属性, 而不是使用tempFilePaths, 因为iOS的image不能加载微信的wxfile://协议引用的tmp临时文件
from simple-crop.
现在 我看tempFilePaths 和 tempFiles 中都是返回的 wxfile://协议引用的tmp临时文件
@newbieYoung
from simple-crop.
from simple-crop.
Related Issues (20)
- 希望能有Taro版本
- 可以支持手动调整截图框的大小么? HOT 2
- 小程序端不能加载网络图片 HOT 2
- 页面一开始加载图片,图片会被压缩变形这个怎么解决 HOT 3
- 【小程序】iOS选取图片和拍照选取后,图片无法加载的问题。 HOT 8
- 有没有支持vue3的版本 HOT 1
- 小程序裁剪之后无法自动关闭 HOT 1
- 请问引入时报错缺乏对应的loader? HOT 1
- iPhone8 plus无法加载 HOT 5
- 是否可以支持自由描边? HOT 3
- 小程序版本在IOS中,选择图片超过1024*1024显示不出来。 HOT 2
- Circle HOT 1
- pc端加载网络图片报跨域问题 HOT 2
- 此版本在ipad这样的尺寸,横屏使用的场景,没有得到很好的兼容,希望作者尽快能优化一下 HOT 1
- 能设置裁切比例吗 HOT 1
- 请问怎么去掉这项功能,有参数设置吗(支持边界判断、当裁剪框里出现空白时,图片自动吸附至完全填满裁剪框) HOT 1
- 小程序版本不可调整裁减比例 HOT 1
- 希望能有taro-vue3版本 HOT 1
- 说好的全平台呢,怎么少了个angular 版本
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from simple-crop.