关于C#实现本机摄像头拍照的执行报错
[local]1[/local]private void button1_Click(object sender, EventArgs e)
{
if (videoSource == null)
return;
Bitmap bitmap = videoSourcePlayer1.GetCurrentVideoFrame();
string fileName = "wqf.jpg";//DateTime.Now.ToString("yyyy-MM-dd-HH-mm-ss-ff") + ".jpg";
bitmap.Save(@"d:\temp\" + fileName,ImageFormat.Jpeg);//此处报错,未将对象引用设置到对象的实例,求助各位高手
bitmap.Dispose();
}