|
-
Jan 3rd, 2004, 12:41 AM
#1
Thread Starter
Hyperactive Member
how to copy part of screen to an array?
I need copy part (not the entire) of the screen to an array, so that I can do some image processing stuff. What I am doing now is:
1) simulate key press of CTRL+ALT+SNAPSHOT;
2) Copy Data from clipboard to an BMP;
3) Use GetDIBits to get an array (A) of the entire BMP;
4) Then get the part of array that I want from A;
It works. However, it has some problems:
1) I only need a small part of the screen, use the above method, the BMP is the entire screen, it takes more time and memory;
2) step 3) takes too much time (since it copies all elements in the BMP);
What I use in step 3) is:
Call GetDIBits(lDC, lBmp, 0, vBMP.Height, mBits(0, 0), vBMI, 0) ' Get bits
and I tried to figure out how to copy a part of the BMP, say the area (100, 200)-(150, 250), however, I failed.
Anyone had the experience? I tried google, however, could not find the solution.
Thank you very much
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|