Efficient way to access off-screen buffer memory

Posted on 2008-11-11
Last Modified: 2013-12-26
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?

if(hDesktopCompatibleDC==NULL || hDesktopCompatibleBitmap == NULL)
Question by:razn
    1 Comment
    LVL 11

    Accepted Solution

    Actually, memory DCs (that's what you're creating when you call createCompatibleDC) are pretty fast.

    You don't say which version of windows you're running on, or your targit screen resolution, type of machine, etc, so it's hard to suggest alternatives, but, yeah, that's a pretty good way to go.


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Why You Should Analyze Threat Actor TTPs

    After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

    This article applies to This article will be of use if you are the owner / supporter of any computer that comes with a discrete graphics card from nVidia / ATI Radeon (Now owned by AMD) or any embedded graphics solution and need to upgrade the gr…
    It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
    Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…

    794 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now