You are here: GdPicture.NET > Documentation > Classes > GdPictureImaging Class > GdPictureImaging Methods > 2D DataMatrix Barcode Recognition Extension > BarcodeDataMatrixReaderGetBarcodeY4 Method
logo.gif
ContentsIndexHome
PreviousUpNext
GdPictureImaging.BarcodeDataMatrixReaderGetBarcodeY4 Method

Returns the Y position (in pixel) of the bottom-right corner of a barcode detected by the BarcodeDataMatrixReaderDoScan function.

C#
public int BarcodeDataMatrixReaderGetBarcodeY4(
    int BarcodeNo
);
Visual Basic
Public Function BarcodeDataMatrixReaderGetBarcodeY4(
    ByVal BarcodeNo As Integer
) As Integer
Parameters
Parameters 
Description 
BarcodeNo 
Barcode index. Must be between 1 and BarcodeDataMatrixReaderGetBarcodeCount returned value. 
Returns

The barcode Y position of the bottom-right corner.

This function requires the optional GdPicture DataMatrix Barcode Recognition Plugin. This Plugin must be unlocked with the SetLicenseNumberDataMatrixBarcodeRecognition() function.

Detecting all DataMatrix barcode of an image 

 

   Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
       Dim oGdPictureImaging As New GdPicture.GdPictureImaging
       Dim ImageID As Integer

       oGdPictureImaging.SetLicenseNumber("XXX") 'Unlocking GdPicture.NET -> Replace XXX by a valid license KEY
       oGdPictureImaging.SetLicenseNumberDataMatrixBarcodeRecognition("XXX") 'Unlocking the optional GdPicture DataMatrix Barcode Recognition Plugin -> Replace XXX by a valid license KEY

       ImageID = oGdPictureImaging.CreateGdPictureImageFromFile("") 'Prompt the user to select an image

       If ImageID <> 0 Then
           If oGdPictureImaging.BarcodeDataMatrixReaderDoScan(ImageID) = GdPictureStatus.OK Then 'Start DataMatrix barcode scanning process
               Dim BarcodeCount As Integer = oGdPictureImaging.BarcodeDataMatrixReaderGetBarcodeCount

               If BarcodeCount > 0 Then
                   For i As Integer = 1 To BarcodeCount
                       MsgBox("Barcode No: " & Str(i))
                       MsgBox("Value: " & oGdPictureImaging.BarcodeDataMatrixReaderGetBarcodeValue(i))
                       MsgBox("Rows: " & Str(oGdPictureImaging.BarcodeDataMatrixReaderGetBarcodeRows(i)))
                       MsgBox("Columns: " & Str(oGdPictureImaging.BarcodeDataMatrixReaderGetBarcodeColumns(i)))
                   Next
               Else
                   MsgBox("No barcode detected !")
               End If

               oGdPictureImaging.BarcodeDataMatrixReaderClear() 'Release detection info from memory
           End If
           oGdPictureImaging.ReleaseGdPictureImage(ImageID)
       End If
   End Sub
What do you think about this topic? Send feedback!
Copyright (c) 2009-2011 www.gdpicture.com. All rights reserved.