Example #1
0
 public Bitmap getBitmap()
 {
     if (activeDevice != null)
     {
         Image    camImage = activeDevice.Capture();
         Bitmap   cam      = new Bitmap(camImage.Width, camImage.Height);
         Graphics g2       = Graphics.FromImage(cam);
         g2.DrawImage(camImage, new Rectangle(0, 0, cam.Width - 1, cam.Height - 1), new Rectangle(0, 0, camImage.Width - 1, camImage.Height - 1), GraphicsUnit.Pixel);
         return(cam);
     }
     else
     {
         return(null);
     }
 }