Java tutorial
//package com.java2s; import java.io.ByteArrayInputStream; import android.graphics.drawable.Drawable; public class Main { public static Drawable byteToDrawable(byte[] byteArray) { ByteArrayInputStream ins = null; if (byteArray != null) { ins = new ByteArrayInputStream(byteArray); } return Drawable.createFromStream(ins, null); } }