Java tutorial
//package com.java2s; import android.graphics.Bitmap; import android.graphics.BitmapFactory; public class Main { public static Bitmap toBitmap(byte[] data) { Bitmap bitmap = null; try { bitmap = BitmapFactory.decodeByteArray(data, 0, data.length); } catch (OutOfMemoryError e) { } return bitmap; } }