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.Bitmap.Config;

public class Main {
    public static Bitmap ARGBToBitmap(int width, int height, int[] data) {
        int ilength = data.length;
        int[] colors = new int[ilength];
        System.arraycopy(data, 0, colors, 0, ilength);
        Bitmap bmp = Bitmap.createBitmap(width, height, Config.ARGB_8888);
        return bmp;
    }
}