B4A Library CRZXing v2 - encode/decode barcodes using a bitmap

CRZXing is a Java library for decoding barcodes from a bitmap image rather than from an image taken with the camera.

This library is based on the ZXing library from Google.

The attached zip file includes a B4A test app (built with B4A version 3.82) and the wrapper XML, jar, and source code. The wrapper was built using the Simple Library Compiler from Anywhere Software.

I have used a specific version of the ZXing library, 3.1.0. You need to download two ZXing jar files, core-3.1.0.jar and javase-3.1.0.jar.

These two jar files can be found at the ZXing website at: http://repo1.maven.org/maven2/com/google/zxing/

B4A Test App:

upload_2014-12-17_0-56-16.png


The test app shows three types of barcodes, a UPC/EAN barcode, a Code39 text barcode (notice the "!" is encoded as "/A" by ZXing), and a Darth Vader barcode ;) that returns null to indicate decode failure.

I haven't tested, but I would guess that this library also works with B4J since it is pure Java. Also not tested is decoding QR codes, but I would expect it to work.

Barry.
 

Attachments

  • CRZXing.zip
    52.7 KB · Views: 518

canalrun

Well-Known Member
Licensed User
Longtime User
CRZXing is a Java library for decoding barcodes from a bitmap image rather than from an image taken with the camera.
CRZXing2 adds barcode encoding, returning a bitmap.

This library is based on the ZXing library from Google.

The attached zip file includes a B4A test app (built with B4A version 3.82) and the wrapper XML, jar, and source code. The wrapper was built using the Simple Library Compiler from Anywhere Software.

I have used a specific version of the ZXing library, 3.1.0. You need to download two ZXing jar files, core-3.1.0.jar and javase-3.1.0.jar.

These two jar files can be found at the ZXing website at: http://repo1.maven.org/maven2/com/google/zxing/

B4A Test App:

upload_2014-12-17_22-49-41.png


The test app shows examples of encoding UPC_A, QR Code, and a nonsense barcode format to demonstrate how errors can be detected.

The B4A code completion function shows the available barcode formats for encoding.

Barry.
 

Attachments

  • CRZXing2.zip
    77.9 KB · Views: 456
Last edited:
Top