关于使用ImageLoader出现的Bitmap too large to be uploaded into a texture
来源:互联网 发布:无网络传奇单机破解版 编辑:程序博客网 时间:2024/05/01 23:13
用ImageLoad加载图片,会有的图片load不出来,报出的警告是: Bitmap too large to be uploaded into a texture (440x6405, max=4096x4096):
经过查找资料是因为当开启硬件加速的时候,GPU对于openglRender 有一个限制,这个不同的手机会有不同的限制:
这个限制值可以通过canvas.getMaximumBitmapHeight()和canvas.getMaximumBitmapWidth()来获得。
至于原则上是当没有硬件加速时应该不会出现这个错误,但是没有验证
对于ImageLoader的处理方式时可以对ImageView设置最大高度和最大宽度:
android:maxHeight="1000dip"
android:maxWidth="1000dip"
同时相应的scaleType为FIT_CENTER FIT_XY FIT_START FIT_END CENTER_INSIDE
在上面这些scaleType下,当bitmap的高和宽一个大于所设的最大值时,imageloader会自动处理,按比例缩放
当scaleType为 MATRIX CENTER CENTER_CROP时 要高宽两者都大于所设的最大值时,imageloder才会处理
附上相关的网站参考
https://github.com/nostra13/Android-Universal-Image-Loader/issues/98
http://blog.zfdang.com/2013/03/summary-of-image-processing-in-android/
http://stackoverflow.com/questions/7428996/hw-accelerated-activity-how-to-get-opengl-texture-size-limit
- 关于使用ImageLoader出现的Bitmap too large to be uploaded into a texture
- android加载长图片出现Bitmap too large to be uploaded into a texture的解决方案
- Bitmap too large to be uploaded into a texture
- Bitmap too large to be uploaded into a texture 解决方法
- Bitmap too large to be uploaded into a texture exception
- Bitmap too large to be uploaded into a texture
- Bitmap too large to be uploaded into a texture
- Bitmap too large to be uploaded into a texture
- Bitmap too large to be uploaded into a texture
- Bitmap too large to be uploaded into a texture 解决方案
- Bitmap too large to be uploaded into a texture 解决方法
- Bitmap too large to be uploaded into a texture
- setImageResource导入图片出现"Bitmap too large to be uploaded into a texture"
- Android,Gilde框架加载图片进内存。出现的Bitmap too large to be uploaded into a texture
- Bitmap too large to be uploaded into a texture问题的解决方法
- 解决:Bitmap too large to be uploaded into a texture exception
- 解决:Bitmap too large to be uploaded into a texture exception
- 解决:Bitmap too large to be uploaded into a texture exception
- Linux正则表达式
- 为WebForms说几句话,以及一些ASP.NET开发上的经验
- 杂七杂八的东西
- Unity3D的wamp5服务器 加载材质
- Entity Framework返回IEnumerable还是IQueryable?
- 关于使用ImageLoader出现的Bitmap too large to be uploaded into a texture
- 临时表
- 十道海量数据处理面试题与十个方法大总结
- 转载_ARM-Linux内核驱动加载过程思路
- c++学习笔记(1)——环境搭建、经典教程推荐及 Visual Studio 2005/2008中如何编译和运行C++程序
- mark
- Google Map Android api V2 中使用MapView遇到CameraUpdateFactory is not initialized!的解决办法
- 设置JAVA_OPTS
- LeetCode-Pascal's Triangle