解决:Bitmap too large to be uploaded into a texture exception
来源:互联网 发布:nib文件怎么打开 mac 编辑:程序博客网 时间:2024/05/18 22:54
简单说就是硬件加速的时候,对图片的大小有限制。不同设备可能有不同的最大值。这个问题悲催的地方是,程序貌似没有捕获到这个exception, 结果是程序也不报错,图片也显示不出来。只有看debug log才能发现这个error message.
一个解决的方法是禁止硬件加速,简单粗暴:有关
<application android:hardwareAccelerated="false" ...>
比较好的解决方法是类似google map的实现:将图片分成不同的块,每次加载需要的块。android提供了一个方法:
http://developer.android.com/reference/android/graphics/BitmapRegionDecoder.html
1
public
void
drawBitmap (Bitmap bitmap, Rect src, RectF dst, Paint paint)
2
3
public
Bitmap decodeRegion (Rect rect, BitmapFactory.Options options)
采取上述操作后,就可以加载很多图片,同时也可以显示超级大图了。
0 0
- 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
- 解决: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
- 解决: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
- 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 解决方案
- Bitmap too large to be uploaded into a texture 解决方法
- Bitmap too large to be uploaded into a texture
- 堆排序
- CSS水平居中和垂直居中的各种方法
- 美国最受欢迎的25个App都是哪些?
- 介绍 JSON
- 【Nutch2.2.1源代码分析之5】索引的基本流程
- 解决:Bitmap too large to be uploaded into a texture exception
- Highstock图表插件的一个详细的Demo,日期什么全部中文
- 2405_Specialized Four-Digit Numbers(进制)
- android edit属性
- 让时间流动起来 摄影师艾清解密延时摄影
- list 中contains
- 深入图解字符集与字符集编码(二)——字符集及其编号
- 【Java.JMS】JMS基础
- poj 2096