Glide支持webp扩展
来源:互联网 发布:手机贴吧抢二楼软件 编辑:程序博客网 时间:2024/06/07 22:31
Glide的gif加载性能比fresco要好,但是Glide并不支持动态的webp,取舍后决定用fresco的webp库扩展Glide,让Glide也支持动态webp。
Glide的框架十分优秀,能简单的进行扩展,有时间会写一下Glide源码解读的文章。
使用方法:在application.onCreate里面添加下面两行,注册webp的解码器
// webp支持ResourceDecoder decoder = new WebpResourceDecoder(this);Glide.get(this).getRegistry().append(InputStream.class, Drawable.class, decoder);
项目用的是Glide jar包集成,也可以用maven集成只需要
compile files('libs/glide-4.0.0.jar') compile files('libs/glide-okhttp3-integration-4.0.0-SNAPSHOT.jar')// compile 'com.github.bumptech.glide:glide:4.0.0-RC1'// compile 'com.github.bumptech.glide:okhttp3-integration:4.0.0-RC1'
compile "com.facebook.fresco:animated-webp:0.11.0"
源码地址 :https://github.com/roths/GlideWebpSupport
阅读全文
0 0
- Glide支持webp扩展
- Glide加载drawable的webp
- iOS webp支持
- 让浏览器支持Webp
- SDWebImage支持webp
- iis让支持webp文件
- WebP 探寻之路 --- SDWebImage支持webp格式的图片
- 支持Android4.0以下webp的使用
- 支持Android4.0以下webp的使用
- 支持Android4.0以下webp的使用
- 支持Android4.0以下webp的使用
- 支持Android4.0以下webp的使用
- SDWebImage如何支持的WebP格式
- 如何让Ubuntu系统支持WebP图片格式
- 如何让Ubuntu系统支持WebP图片格式
- iOS 全面支持 webp格式图片
- 让你的页面支持WebP图像!
- WebP 原理和 Android 支持现状介绍
- 数据结构--------图
- UVA-70474Where is the Marble?
- 欢迎使用CSDN-markdown编辑器
- java生成excel及下载 poi
- 一道很水的题目但是会错的莫名奇妙
- Glide支持webp扩展
- Windows Message Queue
- 编程题汇总5
- 其他用户登录hive问题
- javascript完成表格的添加和删除功能
- 指针
- window下安装gvim
- ES6中的变量 let 和const的区别
- LeetCode_Easy心得:13. Roman to Integer (C语言)