List of utility methods to do Bitmap Pixel Get
int[] | getPixels(Bitmap bit) get Pixels int w = bit.getWidth(), h = bit.getHeight(); int pixels[] = new int[w * h]; bit.getPixels(pixels, 0, w, 0, 0, w, h); return pixels; |
int[] | getPixels(Bitmap bit) get Pixels int w = bit.getWidth(), h = bit.getHeight(); int pixels[] = new int[w * h]; bit.getPixels(pixels, 0, w, 0, 0, w, h); return pixels; |
int[][] | getPixelsMatrixFromBitmap(Bitmap bitmap) get Pixels Matrix From Bitmap int[][] pixelMatrix = new int[bitmap.getWidth()][bitmap.getHeight()]; for (int i = 0; i < bitmap.getWidth(); i++) for (int j = 0; j < bitmap.getHeight(); j++) pixelMatrix[i][j] = bitmap.getPixel(i, j); return pixelMatrix; |