获取图像的RGB值,当用户对图像点击 [英] Get rgb value of image when user clicked on image

查看:164
本文介绍了获取图像的RGB值,当用户对图像点击的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我创建一个地图应用。我需要的 RGB :当用户点击图像的图像值。
图片是的ImageView

请帮忙。


解决方案

  INT颜色code = imageView.getDrawingCache()与getPixel(X,Y)。

//这里的x,y坐标是

下面是一个的链接

I am creating a map application. I need to get RGB value of image when user clicked on image. Image is in ImageView.

Please help.

解决方案

int ColorCode = imageView.getDrawingCache().getPixel(x, y);

//here x,y are coordinates

here is an link

这篇关于获取图像的RGB值,当用户对图像点击的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆