Prashant Singh
Prashant Singh

Reputation: 3793

Get pixel values of a bitmap image in Android

I need to develop an android application which do some image processing on the image input. For this, I need to get the pixel values of the bitmap in either an array or an object. Can anyone help me to grab the pixel-level details of a bitmap image.

Thanks !

Upvotes: 1

Views: 6174

Answers (2)

Willians
Willians

Reputation: 11

if you want to get the value of on pixel do this int pixel = bitmap.getPixel(x, y);

Upvotes: 1

Mayank
Mayank

Reputation: 8852

to get pixel array of bitmap

bitmap.getPixels(pixels, offset, stride, x, y, width, height);

every pixel/value in array will be represented as Color with ARGB value.

Upvotes: 2

Related Questions