Streaming Video Using GDI+
 
Hello,
I am having trouble trying to stream the pixel data, being feed to the
computer by a framegrabber. Using GDI+ i have managed to display the
image but it is just one image and nothing more, and the program begin
to slow. I cannot see what it is i am doing wrong? Can anybody help me?
I feed it the data from the framegrabbers in as InterBuffer. I use the
while loop to spit the images to the screen.
                        while(welcome==false){
        BYTE* InterBuffer = new BYTE[bufSize];
                    Rect rect12(0,0,acqWinWidth,acqWinHeight);
                    Rect rc(50,60,abs(acqWinWidth*x1),
abs(acqWinHeight*y1));
        HWND hRightCam;
        hRightCam = RightCamWindow->GetSafeHwnd();
        HDC hdRightCam = ::GetDC(hRightCam);
        RightCamWindow->GetWindowRect(MrRect);
        Graphics graphics(hdRightCam);
        InterBuffer = (BYTE*)RGBBuffer;
        m_hBitmapImageTriggerLeft =
CreateBitmap(acqWinWidth,acqWinHeight,1,32,InterBuffer);
        Bitmap b(m_hBitmapImageTriggerLeft,hPal);
        TextureBrush brush(&b,rect12);
        brush.ScaleTransform(x1,y1,m_AScale ? MatrixOrderPrepend :
MatrixOrderAppend);
        graphics.DrawImage(&b, rc);
        graphics.ReleaseHDC(hdRightCam);
        brush.ResetTransform();
    }