android获取View上某点的颜色

//根据坐标获取 ImageView imageView = ((ImageView)v);

Bitmap bitmap = ((BitmapDrawable)imageView.getDrawable()).getBitmap();

int pixel = bitmap.getPixel(x,y);

//获取颜色 int redValue = Color.red(pixel);

int blueValue = Color.blue(pixel);

int greenValue = Color.green(pixel);

posted @ 2015-07-23 14:50  brave-sailor  阅读(1655)  评论(0编辑  收藏  举报