Link to home
Start Free TrialLog in
Avatar of razn
razn

asked on

Efficient way to access off-screen buffer memory

Hi,
I have a graphic application the draw images into off-screen buffer. 1000 times in a second the buffer pixels should be captured to memory. ( I need to pass the off-screen pixels to another application that compress the frame.) I have a code sample that uses CreateDIBSection and pass pBits. This way pBits provides me direct access to the pixels.

What is the most efficient way to do it?

hDesktopCompatibleDC=CreateCompatibleDC(hDesktopDC);
hDesktopCompatibleBitmap=CreateDIBSection(hDesktopDC,&bmpInfo,DIB_RGB_COLORS,&pBits,NULL,0);
if(hDesktopCompatibleDC==NULL || hDesktopCompatibleBitmap == NULL)
ASKER CERTIFIED SOLUTION
Avatar of jgordos
jgordos
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial