检索像素信息 [英] Retrieving pixel information

查看:87
本文介绍了检索像素信息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试从屏幕上任何位置的给定像素读取颜色信息。我用 GetPixel(h,x,y)尝试过,但结果总是白色的。还有另一种方式,或者我怎样才能使它工作(或者我已经错过了一个关于它的主题?)。我正在使用Visual Studio2008bèta2。

解决方案




检查:

展开 | 选择 | Wrap | 行号


我试过这个,但是当我尝试运行程序时,我收到了警告: NullReferenceExeption未处理。Yarr Of Doom


现在我也尝试''公共bmp作为位图'',但这只会导致编译错误与描述:重载决议失败,因为没有加入sible''New''接受这个数量的论点。

我真的需要这个函数,所以请有人回复...


Yarr Of Doom

I''m trying to read the color information from a given pixel anywhere on the screen. I''ve tried it with GetPixel(h, x, y), but the result is always white. Is there another way, or how can I make it work (or already a topic about it that I missed?). I''m using Visual Studio 2008 bèta 2.

解决方案

Hi,

Check this :

Expand|Select|Wrap|Line Numbers


I''ve tried this, but the when I try to run the program, I recieve the warning: "NullReferenceExeption was unhandled."Yarr Of Doom


Now I''ve also tried ''Public bmp as new bitmap'', but that only results in a compile error with the description: "Overload resolution failed because no accesible ''New'' accepts this number of arguments."
I really need this function, so please somebody reply...

Yarr Of Doom


这篇关于检索像素信息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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