Reads barcodes contained within images.
Usage
To read barcodes contained within an image:
-
Create an instance of {@link tasman.bars.jme.BarReader};
the preferred constructor takes a reference to the image to be read.
-
Create an instance of {@link tasman.bars.jme.ReadOptions}.
-
Set the fields of the {@link tasman.bars.jme.ReadOptions}
instance to specify options such as barcode symbology.
-
Invoke the {@link tasman.bars.jme.BarReader#readBars(tasman.bars.jme.ReadOptions)}
method. This returns an array of {@link tasman.bars.jme.BarCode}
instances; each element of the array corresponds to a barcode read from
the image.
Each of the above steps are illustrated in the following code:
BarReader br = new BarReader( myImage ); // 1: Create BarReader for specified image.
ReadOptions options = new ReadOptions(); // 2: Create a ReadOptions.
options.codeDataMatrix = true; // 3: Symbology to read.
BarCode[] bars = br.readBars( options ); // 4: Read the barcodes contained in the image.
for ( int i = 0; i < bars.length; i++ ) // Process the results.
doSomething( bars[ i ].getString() );
Compatibility
The package is compatible with Java ME CLDC MIDP:
- Java ME: Java Platform, Micro Edition (formerly J2ME);
- CLDC: Connected Limited Device Configuration 1.1;
- MIDP: Mobile Information Device Profile 2.0.
Related Documentation
The tasman.bars.jme readme guide.
Disclaimer
There is no warranty that the tasman.bars.jme package will
successfully read a barcode in an image, nor that it will not report barcodes
that do not in reality exist in the image.