Reads barcodes contained within images.

Usage

To read barcodes contained within an image:
  1. Create an instance of {@link tasman.bars.jme.BarReader}; the preferred constructor takes a reference to the image to be read.
  2. Create an instance of {@link tasman.bars.jme.ReadOptions}.
  3. Set the fields of the {@link tasman.bars.jme.ReadOptions} instance to specify options such as barcode symbology.
  4. 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:

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.