Java tutorial
//package com.java2s; //License from project: Open Source License import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.support.annotation.Nullable; public class Main { public static @Nullable Bitmap fromByteArray(@Nullable byte[] bytes) { if (bytes == null) return null; return BitmapFactory.decodeByteArray(bytes, 0, bytes.length); } }