简体   繁体   中英

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 !

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.

如果你想获得on像素的值,请执行此操作int pixel = bitmap.getPixel(x,y);

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM