Hi I am using API cap API to connect my applicaiton to webcam.... can using grabframe api to capture the frame..
Sample funtion to grap the frame is function body
Grab()
{
capGrabFrame(web_cam);
capEditCopy(web_cam);
OpenClipboard();
HANDLE hClipBoard = GetClipboardData(CF_DIB);
BITMAPINFOHEADER* pBITINFO;
pBITINFO= (BITMAPINFOHEADER*)GlobalLock(hClipBoard);
unsigned char* imagedata = (unsigned char*)pInfo ;
GlobalUnlock(hClipBoard);
CloseClipboard();
FILE * imagefile;
imagefile = fopen ("C:\\Image.bmp" , "wb+");
fwrite ((unsigned char*)imagedata, 1 , 360*240, imagefile );
fclose (imagefile );
}
I dont know where is the problem :( ... As when i open the image.bmp ... i am unable to see anything.... Also i dont want to use the capFileSaveDIB API... Because i want the direct access to Image Captured array pixels, so that later i need to change to jpeg format using those pixel value.. can any body please help me out