在获取Android的位图图像的像素值位图、像素、图像、Android

2023-09-09 21:03:28 作者:我救你

我需要开发一个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.

谢谢!

推荐答案

得到位图的像素阵列

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

在阵列的每个像素/值将被重新psented的颜色与ARGB价值$ P $。

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