BitmapFactory .Options opts = new BitmapFactory.Options();
opts. inJustDecodeBounds = false ;//inJustDecodeBounds 需要设置为false,如果设置为true,那么将返回null
opts. inSampleSize = size
;
bitmap = BitmapFactory. decodeByteArray(byteArray,
0, byteArray.length , opts);