• 6930阅读
  • 5回复

如何得到pixmap中一个像素点的颜色值? [复制链接]

上一主题 下一主题
离线cdutherbert
 
只看楼主 倒序阅读 楼主  发表于: 2009-04-01
如何得到pixmap中一个像素点的颜色值?用qcolor表示。谢谢
离线songxizg

只看该作者 1楼 发表于: 2009-04-02
关注
离线nmiirq

只看该作者 2楼 发表于: 2009-04-02
将QPixmap转化成为QImage,再用其中的
QRgb QImage::pixel ( const QPoint & position ) const
来得到!
QPixmap适合于显示图像,而QImage适合于处理图像!
离线cdutherbert
只看该作者 3楼 发表于: 2009-04-05
谢谢。。。
离线wangying0904
只看该作者 4楼 发表于: 2011-03-09
那QRgb QImage::pixel ( const QPoint & position ) const 该怎么使用呢?
离线jwchen08
只看该作者 5楼 发表于: 2011-03-11
回 4楼(wangying0904) 的帖子
QColor color=QImage::pixel(i,j);

int r=color.red();
int g=color.green();
int b=color.blue();
快速回复
限100 字节
 
上一个 下一个