Java tutorial
//package com.java2s; import android.graphics.Bitmap; public class Main { public static int[] bitmapToIntArray(Bitmap bitmap) { final int bitmapWidth = bitmap.getWidth(); final int bitmapHeight = bitmap.getHeight(); int[] colors = new int[bitmapWidth * bitmapHeight]; bitmap.getPixels(colors, 0, bitmapWidth, 0, 0, bitmapWidth, bitmapHeight); return colors; } }