GdPicture.NET Reference Guide
BarcodeAztecReaderClear Method (GdPictureImaging)
Example 





GdPicture14 Namespace > GdPictureImaging Class : BarcodeAztecReaderClear Method
Releases from memory all information about latest Aztec barcode detection.
Syntax
'Declaration
 
Public Sub BarcodeAztecReaderClear() 
public void BarcodeAztecReaderClear()
public procedure BarcodeAztecReaderClear(); 
public function BarcodeAztecReaderClear();
public: void BarcodeAztecReaderClear(); 
public:
void BarcodeAztecReaderClear(); 
Example
Detecting all Aztec barcodes in an image.
Using oImage As GdPictureImaging = New GdPictureImaging()
    Dim imageID As Integer = oImage.CreateGdPictureImageFromFile("")
    If oImage.GetStat() = GdPictureStatus.OK Then
        If oImage.BarcodeAztecReaderDoScan(imageID) = GdPictureStatus.OK Then
            Dim barcodeCount As Integer = oImage.BarcodeAztecReaderGetBarcodeCount()
            If barcodeCount > 0 Then
                Dim message As String = "The number of barcodes detected in the source file: " + barcodeCount.ToString()
                Dim value As String = Nothing
                For i As Integer = 1 To barcodeCount
                    message = message + vbCrLf + "Barcode No: " + i.ToString() + "   value: "
                    value = oImage.BarcodeAztecReaderGetBarcodeValue(i)
                    If oImage.GetStat() = GdPictureStatus.OK Then
                        message = message + oImage.BarcodeAztecReaderGetBarcodeValue(i)
                    Else
                        message = message + "   value: " + oImage.GetStat().ToString()
                    End If
                Next
                MessageBox.Show(message, "BarcodeAztecReaderClear")
            Else
                MessageBox.Show("No barcode detected in the source file!", "BarcodeAztecReaderClear")
            End If
            'Releasing allocated memory.
            oImage.BarcodeAztecReaderClear()
        Else
            MessageBox.Show("The scanning process has failed. Status: " + oImage.GetStat().ToString(), "BarcodeAztecReaderClear")
        End If
        'Releasing the image resource from memory.
        oImage.ReleaseGdPictureImage(imageID)
    Else
        MessageBox.Show("The source file can't be loaded. Status: " + oImage.GetStat().ToString(), "BarcodeAztecReaderClear")
    End If
End Using
using (GdPictureImaging oImage = new GdPictureImaging())
{
    int imageID = oImage.CreateGdPictureImageFromFile("");
    if (oImage.GetStat() == GdPictureStatus.OK)
    {
        if (oImage.BarcodeAztecReaderDoScan(imageID) == GdPictureStatus.OK)
        {
            int barcodeCount = oImage.BarcodeAztecReaderGetBarcodeCount();
            if (barcodeCount > 0)
            {
                string message = "The number of barcodes detected in the source file: " + barcodeCount.ToString();
                string value = null;
                for (int i = 1; i <= barcodeCount; i++)
                {
                    message = message + "\nBarcode No: " + i.ToString() + "   value: ";
                    value = oImage.BarcodeAztecReaderGetBarcodeValue(i);
                    if (oImage.GetStat() == GdPictureStatus.OK)
                        message = message + oImage.BarcodeAztecReaderGetBarcodeValue(i);
                    else
                        message = message + "   value: " + oImage.GetStat().ToString();
                }
                MessageBox.Show(message, "BarcodeAztecReaderClear");
            }
            else
                MessageBox.Show("No barcode detected in the source file!", "BarcodeAztecReaderClear");
            oImage.BarcodeAztecReaderClear(); //Releasing allocated memory.
        }
        else
            MessageBox.Show("The scanning process has failed. Status: " + oImage.GetStat().ToString(), "BarcodeAztecReaderClear");
        oImage.ReleaseGdPictureImage(imageID); //Releasing the image resource from memory.
    }
    else
        MessageBox.Show("The source file can't be loaded. Status: " + oImage.GetStat().ToString(), "BarcodeAztecReaderClear");
}
See Also

Reference

GdPictureImaging Class
GdPictureImaging Members