public Bitmap decodeAbtoBm(byte[] b, int actualSize) {
System.gc();
Runtime.getRuntime().gc();
Options oo = new Options();
oo.inJustDecodeBounds = true;
BitmapFactory.decodeByteArray(b, 0, b.length, oo);
int scale = 1;
while ((oo.outWidth / scale) / 2 >= actualSize && (oo.outHeight / scale) / 2 >= actualSize) {
scale *= 2;
}
Options o2 = new Options();
o2.inSampleSize = scale;
o2.inPurgeable = true;
o2.inInputShareable = true;
Bitmap bm = BitmapFactory.decodeByteArray(b, 0, b.length, o2);
System.gc();
Runtime.getRuntime().gc();
return bm;
}
RoundImageView.java 文件源码
java
阅读 40
收藏 0
点赞 0
评论 0
项目:letv
作者:
评论列表
文章目录