Android examples for Graphics:Bitmap Byte Array
Convert Bytes to Bitmap
//package com.book2s; import android.graphics.Bitmap; import android.graphics.BitmapFactory; import java.io.ByteArrayInputStream; import java.io.InputStream; public class Main { public final static Bitmap Bytes2Bitmap(byte[] b) { if (b == null) { return null; }/*from w w w. j a v a2 s. c om*/ if (b.length != 0) { InputStream is = new ByteArrayInputStream(b); Bitmap bmp = BitmapFactory.decodeStream(is); return bmp; } else { return null; } } }