private void CreateSnapShot3(string path) { try { var date = DateTime.Now.Year + "-" + DateTime.Now.Month + "-" + DateTime.Now.Day + "-" + DateTime.Now.Hour + "-" + DateTime.Now.Minute + "-" + DateTime.Now.Second; string currentpath; if (String.IsNullOrEmpty(path)) { currentpath = date + ".jpg"; } else { currentpath = path + "\\" + date + ".jpg"; } var image = _snapShot3.TakeSnapshot().ToImage(); image.Save(currentpath, System.Drawing.Imaging.ImageFormat.Jpeg); } catch (Exception ex) { Console.WriteLine(ex.Message); MessageBox.Show("Camera is not connected"); } }
private void CreateSnapShot(string path) { var date = DateTime.Now.Year + "y-" + DateTime.Now.Month + "m-" + DateTime.Now.Day + "d-" + DateTime.Now.Hour + "h-" + DateTime.Now.Minute + "m-" + DateTime.Now.Second + "s"; string currentpath; if (String.IsNullOrEmpty(path)) currentpath = date + ".jpg"; else currentpath = path + "\\" + date + ".jpg"; var snapShotImage = _snapshotHandler.TakeSnapshot().ToImage(); snapShotImage.Save(currentpath, System.Drawing.Imaging.ImageFormat.Jpeg); }
private void CreateSnapShot() { var date = DateTime.Now.Year + "y-" + DateTime.Now.Month + "m-" + DateTime.Now.Day + "d-" + DateTime.Now.Hour + "h-" + DateTime.Now.Minute + "m-" + DateTime.Now.Second + "s"; currentpath = clsGlobalVariables.SnapshotFilesDirectory + date + ".jpg"; var snapShotImage = _snapshotHandler.TakeSnapshot().ToImage(); snapShotImage.Save(currentpath, System.Drawing.Imaging.ImageFormat.Jpeg); }
private Image CameraShot() { SoundPlay(Environment.CurrentDirectory + "\\Media\\CAMERA.WAV"); return(globalSnapshotHandler.TakeSnapshot().ToImage()); }
private void btn_capture_Click(object sender, EventArgs e) { var snapShotImage = _snapshotHandler.TakeSnapshot().ToImage(); pictureHD.Image = (Bitmap)_snapshotHandler.TakeSnapshot().ToImage(); }