Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;

public class Main {
    /**
     * getImage from byte array
     * @param image
     * @return BitMap image
     */
    public static Bitmap getImage(byte[] image) {
        BitmapFactory.Options options = new BitmapFactory.Options();
        options.inSampleSize = 2;
        return BitmapFactory.decodeByteArray(image, 0, image.length, options);
    }
}