ZXing(1)Barcode Image Library

ZXing(斑马穿越)是一款用于解码和编码条形码的库,包括核心图像解码库及多个客户端应用如Android版条码扫描器等。本文介绍如何准备和使用ZXing代码,涵盖下载、解压、构建过程,并导入Eclipse进行研究。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

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
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值