GdPicture.NET Reference Guide
FormDropOut Method (GdPictureImaging)
Example 





GdPicture14 Namespace > GdPictureImaging Class : FormDropOut Method
GdPicture Image Identifier. The Filled Form.
GdPicture Image Identifier. The Empty Template Form Document.Has to be the same Height and Width as ImageID.
Whether or not to try to fix gaps of interaction between form and data.
Removes empty form information and keeps the entered information only. Highly useful for better and faster OCR processing, and reducing the image compression size.
Syntax

Parameters

ImageID
GdPicture Image Identifier. The Filled Form.
TemplateID
GdPicture Image Identifier. The Empty Template Form Document.Has to be the same Height and Width as ImageID.
UseGapCorrection
Whether or not to try to fix gaps of interaction between form and data.

Return Value

A member of the GdPictureStatus enumeration.
Remarks

The Filled Form Image and the Empty Template image have to be the same height and width, or else an Invalid Parameter will be returned.

Setting UseGapCorrection to True, will slow the speed of the algorithm, but will result in much more accurate characters and filled data. Nonetheless, most applications will not need it. If accuracy is what is sought after, set it to true, but make sure the process is called after the scan process and not during to avoid any delays. The slowing of the UseGapCorrection option should be overlooked when considering the tremendous outcomes of FormDropOut mentioned above on the application in general.

Example
Dropping out an image.
Dim oGdPictureImaging As New GdPictureImaging
Dim ImageID As Integer = oGdPictureImaging.CreateGdPictureImageFromFile("input.tif")
If imageId <> 0 Then
   Dim TemplateID As Integer = oGdPictureImaging.CreateGdPictureImageFromFile("template.tif")
   If TemplateID <> 0 Then
      oGdPictureImaging.FormDropOut(ImageID, TemplateID, True)
      oGdPictureImaging.SaveAsTIFF(ImageID, "test.tif", TiffCompression.TiffCompressionCCITT4)
      oGdPictureImaging.ReleaseGdPictureImage(TemplateID)
   Else
      MessageBox.Show("Error: Cannot load template: " + oGdPictureImaging.GetStat().ToString())
   End If
   oGdPictureImaging.ReleaseGdPictureImage(ImageID)
Else
   MessageBox.Show("Error: " + oGdPictureImaging.GetStat().ToString())
End If
See Also

Reference

GdPictureImaging Class
GdPictureImaging Members