用户单击图像时获取图像的rgb值
答
+0
谢谢....但我需要用户点击图像时的rgb值。 – 2012-03-14 11:36:45
+0
您是否检查我提供的链接? – 2012-03-14 11:43:00
+0
我检查....代码是好的,但不是我的目的。在我的应用程序用户点击图像该特定像素的rgb值是需要切换案例。(没有固定的位置和颜色) – 2012-03-14 12:13:37
答
Bitmap bitmap = ((BitmapDrawable)imageView.getBackground()).getBitmap();
int pixel = bitmap.getPixel(xCordinate,yCordinate);
int redValue = Color.red(pixel);
int blueValue = Color.blue(pixel);
int greenValue = Color.green(pixel);
-1代表的研究工作并没有什么试穿自己。 – 2012-03-14 11:27:20
@alextsc他今天只加入SO。他需要通过http://stackoverflow.com/faq – 2012-03-14 11:30:41