4、 byte[] → Bitmap
Java代码如下:
- private Bitmap Bytes2Bimap(byte[] b){ if(b.length!=0){
- return BitmapFactory.decodeByteArray(b, 0, b.length); }
- else { return null;
- } }
- private Bitmap Bytes2Bimap(byte[] b){ if(b.length!=0){
- return BitmapFactory.decodeByteArray(b, 0, b.length); }
- else { return null;
- } }
以上是我在实践中遇到的一些转换,以后遇到类似的就不用到处找了。
希望本文所述对大家的Android程序设计有所帮助。










