BitmapFactory.decodeByteArray函数获取的bitmap为null

来源:互联网 发布:ubuntu下重装ubuntu 编辑:程序博客网 时间:2024/05/16 09:34
BitmapFactory .Options opts = new BitmapFactory.Options();
opts. inJustDecodeBounds = false ;//inJustDecodeBounds 需要设置为false,如果设置为true,那么将返回null
opts. inSampleSize = size ;
bitmap = BitmapFactory. decodeByteArray(byteArray, 0, byteArray.length , opts);
原创粉丝点击