GdPicture.NET Reference Guide
BarcodePDF417ReaderClear Method (GdPictureImaging)
Example 





GdPicture14 Namespace > GdPictureImaging Class : BarcodePDF417ReaderClear Method
Releases from memory all information about latest PDF417 barcode detection.
Syntax
'Declaration
 
Public Sub BarcodePDF417ReaderClear() 
public void BarcodePDF417ReaderClear()
public procedure BarcodePDF417ReaderClear(); 
public function BarcodePDF417ReaderClear();
public: void BarcodePDF417ReaderClear(); 
public:
void BarcodePDF417ReaderClear(); 
Remarks

This method is used in the "Barcode Recognition" Demo.

Example
Detecting all PDF417 barcodes in an image and drawing a rectangle around them.
Dim oGdPictureImaging As New GdPicture.GdPictureImaging
Dim ImageID As Integer = oGdPictureImaging.CreateGdPictureImageFromFile("") 'Prompt the user to select an image
If imageId <> 0 Then
   If oGdPictureImaging.BarcodePDF417ReaderDoScan(ImageID) = GdPictureStatus.OK Then 'Start PDF417 barcode scanning process
      Dim BarcodeCount As Integer = oGdPictureImaging.BarcodePDF417ReaderGetBarcodeCount
      If BarcodeCount > 0 Then
         For i As Integer = 1 To BarcodeCount
            MessageBox.show("Barcode No: " & Str(i))
            MessageBox.show("Value: " & oGdPictureImaging.BarcodePDF417ReaderGetBarcodeValue(i))
            MessageBox.show("Rows: " & Str(oGdPictureImaging.BarcodePDF417ReaderGetBarcodeRows(i)))
            MessageBox.show("Columns: " & Str(oGdPictureImaging.BarcodePDF417ReaderGetBarcodeColumns(i)))
         Next
         Dim X1, X2, X3, X4, Y1, Y2, Y3, Y4 As Integer
         'LeftArea, TopArea are coordinates used by SetROI()
         For i = 1 To oGdPictureImaging.BarcodePDF417ReaderGetBarcodeCount
            X1 = oGdPictureImaging.BarcodePDF417ReaderGetBarcodeX1(i) + LeftArea
            X2 = oGdPictureImaging.BarcodePDF417ReaderGetBarcodeX2(i) + LeftArea
            X3 = oGdPictureImaging.BarcodePDF417ReaderGetBarcodeX3(i) + LeftArea
            X4 = oGdPictureImaging.BarcodePDF417ReaderGetBarcodeX4(i) + LeftArea
            Y1 = oGdPictureImaging.BarcodePDF417ReaderGetBarcodeY1(i) + TopArea
            Y2 = oGdPictureImaging.BarcodePDF417ReaderGetBarcodeY2(i) + TopArea
            Y3 = oGdPictureImaging.BarcodePDF417ReaderGetBarcodeY3(i) + TopArea
            Y4 = oGdPictureImaging.BarcodePDF417ReaderGetBarcodeY4(i) + TopArea
            oGdPictureImaging.DrawLine(ImageID, X1, Y1, X2, Y2, 1, Color.Red, True)
            oGdPictureImaging.DrawLine(ImageID, X2, Y2, X3, Y3, 1, Color.Red, True)
            oGdPictureImaging.DrawLine(ImageID, X3, Y3, X4, Y4, 1, Color.Red, True)
            oGdPictureImaging.DrawLine(ImageID, X4, Y4, X1, Y1, 1, Color.Red, True)
         Next
      Else
         MessageBox.show("No barcode detected !")
      End If
      oGdPictureImaging.BarcodePDF417ReaderClear() 'Release detection info from memory
   End If
   oGdPictureImaging.ReleaseGdPictureImage(ImageID)
End If
See Also

Reference

GdPictureImaging Class
GdPictureImaging Members