Decode byte array to Bitmap - Android android.graphics

Android examples for android.graphics:Bitmap Load Save

Description

Decode byte array to Bitmap

Demo Code

import android.graphics.Bitmap;
import android.graphics.BitmapFactory;

public class Main{

    public static Bitmap toBitmap(byte[] data) {
        return BitmapFactory.decodeByteArray(data, 0, data.length);
    }//w  ww  . j av  a 2s  . c  o  m

}

Related Tutorials