The BarcodeReadActivity Class is available in LEADTOOLS Document and Medical Imaging toolkits.
Searches for barcodes within the specified area.Visual Basic (Declaration) | |
---|---|
Public Class BarcodeReadActivity Inherits Leadtools.Workflow.Raster.DisposableImageActivity Implements IComponent, IDisposable |
Visual Basic (Usage) | Copy Code |
---|---|
Dim instance As BarcodeReadActivity |
C# | |
---|---|
public class BarcodeReadActivity : Leadtools.Workflow.Raster.DisposableImageActivity, IComponent, IDisposable |
C++/CLI | |
---|---|
public ref class BarcodeReadActivity : public Leadtools.Workflow.Raster.DisposableImageActivity, IComponent, IDisposable |
This activity supports all image formats currently supported by LEADTOOLS.
Use this activity to recognize barcode data.
To determine whether a barcode element is duplicated or not, use BarcodeData.IsDuplicated property.
When the Flags property is set to BarcodeReadFlags.UseColors, then this activity will use the BarColor and SpaceColor properties, otherwise it will ignore it and use the default colors of black for bars and white for spaces.
Using colors does not apply for 1 bit per pixel images.
The BarcodeReadFlags.UseColors flag is used with all barcode types.
The BarcodeReadFlags.ReturnCheck flag is used only with reading linear barcodes.
The smallest Data Matrix symbol size is 40 pixels by 40 pixels. It can be read using BarcodeSearchTypeFlags.DatamatrixReadSmall since this enables the reading of Data Matrix symbols that are between 20 to 40 pixels in size.
The Linear barcodes are not supported in UNICODE text.
When using this activity with the ReturnFourPoints flag set, the Location property will be updated with the coordinates of the four corners of the barcode rather than the coordinates of the bounding rectangle. These coordinates are encoded values and must be decoded before they can be used. The following example shows how to decode the four-point corner values:Point p1, p2, p3, p4; int nStartX = barData.Location.Left; int nStartY = barData.Location.Top; int nWidth = barData.Location.Right - nStartX; int nHeight = barData.Location.Bottom - nStartY; p1.X = (nStartX And 0xffff); p1.Y = (nStartX >> 16); p2.X = (nStartY And 0xffff); p2.Y = (nStartY >> 16); p3.X = (nWidth And 0xffff); p3.Y = (nWidth >> 16); p4.X = (nHeight And 0xffff); p4.Y = (nHeight >> 16);
Reading Linear Barcodes (1D):
A barcode is composed of a start mark, data, and the end mark. Reading barcodes from left to right (setting the Direction property to BarcodeDirectionFlags.LeftToRight value) or from right to left (setting the Direction property to BarcodeDirectionFlags.RightToLeft value) will produce the same result in most cases, because the barcode reader engine recognizes the start and end marks, and handles the data accordingly. For example, if BarcodeDirectionFlags.LeftToRight is used and the user reads barcodes from left to right (the barcode is not rotated), the engine will recognize the start mark first, then the data, and finally the end mark. But if the user reads barcodes from right to left (the barcode is rotated 180 degrees), the engine will first recognize the end mark, then read the (reverse-order) data, and then recognize the start mark. In this case, the engine will flip the data to normal (start/data/end) order.
System.Object
System.Workflow.ComponentModel.DependencyObject
System.Workflow.ComponentModel.Activity
Leadtools.Workflow.Raster.WorkflowImageActivity
Leadtools.Workflow.Raster.DisposableImageActivity
Leadtools.Workflow.Barcode.BarcodeReadActivity
Target Platforms: Windows 2000, Windows XP, Windows Server 2003 family, Windows Server 2008 family