Sign in to follow this  
Followers 0
xul8tr

Bitmap vs screen checksum

6 posts in this topic

I was wondering if anybody knew how to compare the pixels on the screen like from the 0,0 cooridinates and 1024x768 and compare them against a 1024x768 bmp to make sure they are the same, i'm going for an automated visual confirmation.

Share this post


Link to post
Share on other sites



I was wondering if anybody knew how to compare the pixels on the screen like from the 0,0 cooridinates and 1024x768 and compare them against a 1024x768 bmp to make sure they are the same, i'm going for an automated visual confirmation.

If you mean comparing the desktop background and a .bmp image of the same size, then you could just do pixelchecks on the .bmp on the pixels you want to check, then use "Program Manager" as the name of the window for the desktop and check the colors at the necessary coordinates.

Note that 0,0 on the desktop is exactly 0,0, but on the .bmp image, 0,0 might be on a toolbar or something since toolbars are considered part of the client area of the window. So you will probably need to accomodate for that.

Nomad :D


Share this post


Link to post
Share on other sites

Yes, that would be the way to go, but I think xul8tr wants to do this without having to open the file in an external program. For the client, I believe (not sure) this might help:

Opt("PixelCoordMode", 2)

Don't take my pic to serious...~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~You Looked, but you did not see!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Share this post


Link to post
Share on other sites

alternitivly it's possible to do this also with my bmp library-

http://www.autoitscript.com/forum/index.php?showtopic=27362

I don't know which is faster but once loading the BMP, pixel read functions go pretty quick in my library,,,(although loading a bmp that size can take a while...)

Share this post


Link to post
Share on other sites

Basically what i do is i have autoit open our program, change the program size to 1024x768 and move it to 0,0, then it will run a script and at the end of the script i have it screenshot 0,0 1024x768 so only the program, what i am looking for is to instead of comparing the correct screenshot vs the one that was just made i compare what is on the desktop to the correct screenshot in the archive.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0