Advertisement

08.22.2003 at 12:08PM PDT, ID: 20717609
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

7.6

Fast capture of screen data into an array of RGB values

Asked by bjornsone in Windows Programming

Tags: , , ,

I need to capture RGB data of a portion of the screen
as fast as possible (capturing for animation purposes).
My current method works, but I've seen other programs which
are faster at capturing animations of the desktop.

I eventually need the data in RGB(888) format, but I could manually
convert the data from the current screen format (e.g. RGB555).  
If it could speed up the whole process, then that's what matters
most.

Here is an outline of my current method:
  captureHWND = myGetSelectedWindow(); //This could be any window (even the desktop itself)
  dataBuffer  = getDataBuffer(); // allocate a place to put the desired data
  bitmapInfo = myGetBitmapInfo(); //Initializes a BITMAPINFO structure (with biCompression = BI_RGB)

  captureHDC=::GetWindowDC(captureHWND);
  bitmapHDC =  CreateCompatibleDC(captureHDC);

  bitmapH=CreateCompatibleBitmap(captureHDC, bitmapResX, bitmapResY); //resolution relates to area of interest
  SelectObject(bitmapHDC, bitmapH);

  do //loop through capturing multiple frames
  {
    GetDIBits(bitmapHDC, bitmapH, 0 , bitmapResY, dataBuffer, bitmapInfo, DIB_RGB_COLORS);
    //do work on each frame of captured data
  } while (...)

Perhaps there is a lower level method of getting at the screen data or an
approach which requires less work out of Windows.  It does need to work
on all of the basic windows platforms: Windows 9x/Me and WinNT/2K/XP

What I want: A sample code snippet that puts RGB screen data into an array
based on being given a specified rectangle of the screen and is faster than the
method I currently use.
Start Free Trial
 
Keywords: Fast capture of screen data into an arr…
 
Loading Advertisement...
 
[+][-]08.22.2003 at 04:02PM PDT, ID: 9207209

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]08.22.2003 at 04:22PM PDT, ID: 9207263

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]08.22.2003 at 09:59PM PDT, ID: 9207970

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]08.24.2003 at 07:41PM PDT, ID: 9213769

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]08.25.2003 at 10:33AM PDT, ID: 9217813

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]08.25.2003 at 06:12PM PDT, ID: 9220633

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10.06.2003 at 09:54PM PDT, ID: 9503285

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: Windows Programming
Tags: capture, screen, data, rgb
Sign Up Now!
Solution Provided By: KrishnaPG
Participating Experts: 3
Solution Grade: A
 
 
[+][-]10.07.2003 at 08:27AM PDT, ID: 9506492

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32