ZXing(一)Barcode Image Library

ZXing(1)Barcode Image Library
ZXing(1)Barcode Image Library

1. Overview
ZXing(Zebra Crossing) is design to decode and encode barcode.

The consist of the library
core - The core image decoding library, and test code
Javase
Zxing.org
Android  - Android client, called Barcode Scanner
Android-test
Android-integration - Support integration with our Barcode Scanner app via intern

Some other additional modules:
Cpp
IPhone - IPhone client + port to Objective C/C++
Zxing.appspot.com: The source behind our web-based barcode generator
CSharp
JRuby:  Ruby wrapper
ActionScript

2. Prepare the codes
Download the latest version of file ZXing-2.1.zip and ZXing-2.1-testdata.zip.
Unzip the project ZXing-2.1.zip first, it contains everything and built by ANT.

The latest version, there are also MAVEN there.
>cd core
>ant
comments the sign part in pom.xml
>mvn clean install -DskipTests=true
>mvn eclipse:eclipse
Import the core part to eclipse to study.

>cd javase
>ant
>mvn eclipse:eclipse

I import this 2 projects in my eclipse and try to understand how it works.

The class I should begin with is
>cd ..
>java -cp javase/javase.jar:core/core.jar com.google.zxing.client.j2se.CommandLineRunner [URL | FILE]

Some important codes are as follow:
CommandLineRunner.java
CommandLineEncoder.java
DecodeThread.java
GenericMultipleBarcodeReader.java

2. Import the Android Code
Import Android project with exists codes
import the project android and it names CaptureActivity


References:
http://code.google.com/p/zxing/
http://code.google.com/p/zxing/w/list

http://www.cnblogs.com/liuan/archive/2012/01/05/2312714.html
http://www.cnblogs.com/liuan/archive/2012/01/05/2313488.html
http://www.cnblogs.com/liuan/archive/2012/01/09/2317377.html
http://www.cnblogs.com/liuan/archive/2012/01/10/2318300.html










相关内容推荐