in
Welcome to Lionhead Community Sign in to Windows Live ID | Help

Last post 06-12-2001, 14:25 by DaJudge. 1 replies.
Sort Posts: Previous Next
  •  06-12-2001, 14:25 295549

    Currently I am playing around with TWAIN to get video data from my WebCam. If people ever complained about DirectX: Go and try TWAIN, then you know what is complicated (The whole interface consists of ONE SINGLE FUNCTION). So far, I made it right up to the point where you capture a single image (just like you would do with a scanner). The docs say that in native XFer mode the source returns a valid bitmap handle. Alright, but I can't do ANYTHING with that thing (like GetObject() or SelectObject()) and the TACKER_32 sample application does something REALLY EVIL with that handle: [code] lpDib = (LPBITMAPINFOHEADER)GlobalLock(hDib); [/code] Am I right? Do they really cast the bitmap handle to a LPBITMAPINFOHEADER? Is that valid? Is that the right and compatible way of doing that? Maybe one of you guys can shed some light into this darkness... Thanks, Alex
  •  06-13-2001, 11:34 295580 in reply to 295549

    Don't use TWAIN... I tried it some time ago for an image analysis thing. It sucked. Use AVICAP and grab a frame or DirectShow. With AVICAP you just use capSetCallbackOnFrame and copy the bitmap out of the lparam. With DirectShow you can write a framegrabbing filter and attach it to the capture pin of the webcam.
View as RSS news feed in XML