AcquisitionImageAcquired Event |
Namespace: Atalasoft.Twain
All pending image acquisitions can be cancelled by setting the CancelPending property of the AcquireEventArgs to true.
To transfer the returned Bitmap to an AtalaImage when integrating with DotImage, use the AtalaImage.FromBitmap method.
When scanning multiple pages at once, this method can be used to compose a multipage image by invoking the Images.Add method of the Workspace object in DotImage.
private void acquisition_ImageAcquired(object sender, Atalasoft.Twain.AcquireEventArgs e) { if (e.Image != null) this.pictureBox1.Image = e.Image; else if (e.FileName != null && File.Exists(e.FileName)) this.pictureBox1.Image = Image.FromFile(e.FileName); }
Private Sub acquisition_ImageAcquired(ByVal sender As Object, ByVal e As Atalasoft.Twain.AcquireEventArgs) If Not e.Image Is Nothing Then Me.pictureBox1.Image = e.Image Else If e.FileName <> Nothing And File.Exists(e.FileName) Then Me.pictureBox1.Image = Image.FromFile(e.FileName) End If End Sub