View Full Version : Resize the video window

March 18, 2010, 07:32:14
I want to show a 640x480 image in a 320x240 window size like a halfview of the other camera, so I try to change by using the function SetWindowPos

// Resize the video window to 640*480 pixels. m_cStaticVideoWindow.SetWindowPos(NULL,0,0,320,240 ,SWP_NOMOVE|SWP_NOZORDER);

But the image is showed has the bad quality with many stars on image!!!
So is there another way to show 640x480 image in 320x240 window if I donot want to change the image size?
I use DFK21AF04 camera with VC++ 2008 in WinXPSP2.


Stefan Geissler
March 18, 2010, 13:01:11

I must admit, I do not understand your issue in detail. Changing the size of the CWnd, that is used to show the live video, has no influence on the live video itself. Is is possible to post a screenshot?

Sometimes the Windows GDI functions that resize a bitmap generate a rastered image. I suppose this is, what happens in your situation. Unfortunatelly, there can not be done anything about this, except display the images on your own. Doing so, you can set the "StretchBltMode" to "Halftone" on the DC, which gives nice images.

March 19, 2010, 05:27:58
I fixed my problem. Thank you.