Android Bitmap Pixel Get getPixels(Bitmap bit)

Here you can find the source of getPixels(Bitmap bit)

Description

get Pixels

Declaration

public static int[] getPixels(Bitmap bit) 

Method Source Code

//package com.java2s;

import android.graphics.Bitmap;

public class Main {
    public static int[] getPixels(Bitmap bit) {
        int w = bit.getWidth(), h = bit.getHeight();
        int pixels[] = new int[w * h];
        bit.getPixels(pixels, 0, w, 0, 0, w, h);

        return pixels;
    }/*  ww  w  .  j av a 2s . co m*/
}

Related

  1. getPixels(Bitmap bit)
  2. getPixelsMatrixFromBitmap(Bitmap bitmap)