我有一个字节数组,我想将其保存为位图图像 . 我该怎么办?我看到了android.graphics.Bitmap,发现了几种方法,但我不知道哪种方法合适 . 例如,createBitmap(int width,int height,Bitmap.Config config) . 我有宽度和高度,但我怎么能给它我的字节数组?
谢谢
查看类BitmapFactory中的方法,例如public static Bitmap decodeByteArray(byte[] data, int offset, int length) .
偏移量应为0,长度应为 array.length .
array.length
1 回答
查看类BitmapFactory中的方法,例如public static Bitmap decodeByteArray(byte[] data, int offset, int length) .
偏移量应为0,长度应为
array.length
.