使用webcam 直接从内存获取图像 非读取ClipBoard或者File.

http://www.codeproject.com/KB/audio-video/VFWWebcam.aspx?msg=3295023#xx3295023xx

 

方法就是使用了回调函数:

private void FrameCallBack(IntPtr hwnd, ref VIDEOHEADER hdr)

网上的会有点不一样,大概都是传回了一个byte【】

 

这个时候:

Bitmap bmp = new Bitmap(frameWidth, frameHeight, counter * frameWidth, format, hdr.lpData);

 

这样就获得了bmp

 

转载于:https://www.cnblogs.com/zc22/archive/2009/12/06/1618160.html

你可能感兴趣的:(使用webcam 直接从内存获取图像 非读取ClipBoard或者File.)