private void zkFprint_OnImageReceived(object sender, IZKFPEngXEvents_OnImageReceivedEvent e) { /*Graphics g = finger_image.CreateGraphics(); * Bitmap bmp = new Bitmap(finger_image.Width, finger_image.Height); * g = Graphics.FromImage(bmp); * int dc = g.GetHdc().ToInt32(); * ZkFprint.PrintImageAt(dc, 0, 0, bmp.Width, bmp.Height); * g.Dispose(); * finger_image.Image = bmp;*/ }
private void zkFprint_OnImageReceived(object sender, IZKFPEngXEvents_OnImageReceivedEvent e) { Graphics g = fpicture.CreateGraphics(); Bitmap bmp = new Bitmap(fpicture.Width, fpicture.Height); g = Graphics.FromImage(bmp); int dc = g.GetHdc().ToInt32(); ZkFprint.PrintImageAt(dc, 0, 0, bmp.Width, bmp.Height); g.Dispose(); fpicture.Image = bmp; }
private void lectorHuellas_OnImageReceived(object sender, IZKFPEngXEvents_OnImageReceivedEvent e) { Graphics g = imgHuellaCapturada.CreateGraphics(); Bitmap bmp = new Bitmap(imgHuellaCapturada.Width, imgHuellaCapturada.Height); g = Graphics.FromImage(bmp); int dc = g.GetHdc().ToInt32(); lectorHuellas.PrintImageAt(dc, 0, 0, bmp.Width, bmp.Height); g.Dispose(); imgHuellaCapturada.Image = bmp; }
private void zkFprint_OnImageReceived(object sender, IZKFPEngXEvents_OnImageReceivedEvent e) { Graphics g = imagenHuellas.CreateGraphics(); Bitmap bmp = new Bitmap(imagenHuellas.Width, imagenHuellas.Height); g = Graphics.FromImage(bmp); int dc = g.GetHdc().ToInt32(); zk_dispositivo.PrintImageAt(dc, 0, 0, bmp.Width, bmp.Height); g.Dispose(); imagenHuellas.Image = bmp; }
private void zkFprint_OnImageReceived(object sender, IZKFPEngXEvents_OnImageReceivedEvent e) { //Console.WriteLine("zkFprint_OnImageReceived 2"); Graphics g = fingerPicture.CreateGraphics(); Bitmap bmp = new Bitmap(fingerPicture.Width, fingerPicture.Height); g = Graphics.FromImage(bmp); int dc = g.GetHdc().ToInt32(); m_zkFprint.PrintImageAt(dc, 0, 0, bmp.Width, bmp.Height); g.Dispose(); fingerPicture.Image = bmp; }
private void ZKFPEngX1_OnImageReceived(object sender, IZKFPEngXEvents_OnImageReceivedEvent e) { ShowHintImage(0); Graphics g = PictureBox1.CreateGraphics(); Bitmap bmp = new Bitmap(PictureBox1.Width, PictureBox1.Height); g = Graphics.FromImage(bmp); int dc = g.GetHdc().ToInt32(); ZKFPEngX1.PrintImageAt(dc, 0, 0, bmp.Width, bmp.Height); g.Dispose(); PictureBox1.Image = bmp; }
private void fp_OnImageReceived(object sender, IZKFPEngXEvents_OnImageReceivedEvent e) { object imgdata = new object(); string base64 = fp.GetTemplateAsString(); bool b = fp.GetFingerImage(ref imgdata); if (b == true) { byte[] data = (byte[])imgdata; MemoryStream ms = new MemoryStream(data); Image image = Image.FromStream(ms); huellas_1.Image = image; huellaByte = data; huellaImagen = image; } }
/// <summary> /// 用于处理IZKFPEngXEvents_OnImageReceivedEvent事件 /// 抛出:指纹仪未初始化 异常 /// </summary> /// <param name="e">IZKFPEngXEvents_OnImageReceivedEvent事件</param> /// <param name="fingerprintDevice">指纹设备(如:AxZKFPEngX1)</param> /// <returns>一个System.Image</returns> public static Image GetFingerprintImage(IZKFPEngXEvents_OnImageReceivedEvent e, AxZKFPEngX fingerprintDevice) { if (fingerprintDevice == null) { throw new ArgumentNullException("fingerprintDevice"); } if (!e.aImageValid) { return(null); } #pragma warning disable 642 if (File.Exists("temp.bmp")) { ; } #pragma warning restore 642 { File.Delete("temp.bmp"); } try { fingerprintDevice.SaveBitmap("temp.bmp"); } catch (Exception ex) { MessageBox.Show(ex.Message); throw; } #pragma warning disable 642 #pragma warning restore 642 { var file = FileContent("temp.bmp"); var ms = new MemoryStream(file) { Position = 0 }; File.Delete("temp.bmp"); return(Image.FromStream(ms)); } }
private void zkFprint_OnImageReceived(object sender, IZKFPEngXEvents_OnImageReceivedEvent e) { //Console.WriteLine("zkFprint_OnImageReceived"); }
void _fpEngine_OnImageReceived(object sender, IZKFPEngXEvents_OnImageReceivedEvent e) { if (_enrollMode == true) { _fpEngine.PrintImageAt((int)picFP.CreateGraphics().GetHdc().ToInt64(), 0, 0, 100, 100); _cntFPEnroll++; txtFPNo.Text = _cntFPEnroll.ToString(); } }
void _fpEngine_OnImageReceived(object sender, IZKFPEngXEvents_OnImageReceivedEvent e) { // Print image _fpEngine.PrintImageAt((int)picFP.CreateGraphics().GetHdc().ToInt64(), 0, 0, 100, 100); txtFPNo.Text = (++_cntFPEnroll).ToString(); }