-
Notifications
You must be signed in to change notification settings - Fork 780
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
2019-08-01:如何处理大图的加载? #111
Comments
This comment has been minimized.
This comment has been minimized.
1.通过第三方软件加载。 |
具体压缩工具,有哪些推荐的呢?大神 |
把图片处理成webp格式,或者用Luban压缩压缩图片 |
1、首先确定大图的用途,精度需求: |
在项目中统一图片库,对不同性能的机型做好加载策略(使用不同的Bitmap.Config加载图片,不同的压缩程度)。 |
上面总结的很好,我说一种应用场景下的解决方案。 |
我也分享下:
|
首先确定需求是否大图可以缩放,如果需要缩放一般图片的宽高都会挺大,如果只是显示就没有必要弄得太大。
|
1.对于本地大图,可以将png格式的转化为webp格式的 |
对于超大类型的图片如果要保证精度和体验,可以采用瓦片地图的方案。 |
先通过BitmapFactory.Options 设置inJustDecodeBounds 不占用内存来获取图片信息 |
No description provided.
The text was updated successfully, but these errors were encountered: