- 浏览: 334665 次
- 性别:
- 来自: 安徽
文章分类
最新评论
-
secally:
楼主可以上传个例子吗,谢谢,我咋跑不起来,,eclipse不是 ...
Android自动打包、签名、优化、上传ANT脚本 -
secally:
请问下执行命令是啥,ant release 还是?麻烦指教谢谢 ...
Android自动打包、签名、优化、上传ANT脚本 -
trp1022:
好牛啊
程序员不能不通文史 -
sunny78117:
谢谢,写得好
Android bitmap优化 -
futurebp:
这是什么类型的脚本啊?
Android自动打包、签名、优化、上传ANT脚本
Google code发现的好东西。
QR code 类库: http://code.google.com/p/zxing/
ZXing (pronounced "zebra crossing") is an open-source, multi-format 1D/2D barcode image processing library implemented in Java. Our focus is on using the built-in camera on mobile phones to photograph and decode barcodes on the device, without communicating with a server. We currently have support for:
UPC-A and UPC-E
EAN-8 and EAN-13
Code 39
Code 93
Code 128
QR Code
ITF
Codabar
RSS-14 (all variants)
Data Matrix ('alpha' quality)
PDF 417 ('alpha' quality)
This library is divided into several components; some are actively supported:
core: The core image decoding library, and test code
javase: J2SE-specific client code
android: Android client, called Barcode Scanner
androidtest: Android test app
android-integration: Supports integration with our Barcode Scanner app via Intent
zxingorg: The source behind zxing.org/w
zxing.appspot.com: The source behind our web-based barcode generator
Some modules are contributed and/or intermittently maintained:
javame: JavaME client
csharp: Partial C# port
cpp: Partial C++ port
rim: RIM/Blackberry-specific client build
iphone: iPhone client + port to Objective C / C++ (QR code only)
bug: Client for BugLabs's BUG
jruby: Ruby wrapper
actionscript: partial port to Actionscript
To complement our decoding software, we have created a web-based QR Code generator which supports contact information, calendar events, URLs, and much more.
此类库做条形码扫描有很大的帮助。
QR code 类库: http://code.google.com/p/zxing/
ZXing (pronounced "zebra crossing") is an open-source, multi-format 1D/2D barcode image processing library implemented in Java. Our focus is on using the built-in camera on mobile phones to photograph and decode barcodes on the device, without communicating with a server. We currently have support for:
UPC-A and UPC-E
EAN-8 and EAN-13
Code 39
Code 93
Code 128
QR Code
ITF
Codabar
RSS-14 (all variants)
Data Matrix ('alpha' quality)
PDF 417 ('alpha' quality)
This library is divided into several components; some are actively supported:
core: The core image decoding library, and test code
javase: J2SE-specific client code
android: Android client, called Barcode Scanner
androidtest: Android test app
android-integration: Supports integration with our Barcode Scanner app via Intent
zxingorg: The source behind zxing.org/w
zxing.appspot.com: The source behind our web-based barcode generator
Some modules are contributed and/or intermittently maintained:
javame: JavaME client
csharp: Partial C# port
cpp: Partial C++ port
rim: RIM/Blackberry-specific client build
iphone: iPhone client + port to Objective C / C++ (QR code only)
bug: Client for BugLabs's BUG
jruby: Ruby wrapper
actionscript: partial port to Actionscript
To complement our decoding software, we have created a web-based QR Code generator which supports contact information, calendar events, URLs, and much more.
评论
4 楼
贝壳水母
2010-06-11
有个地方需要注意下,直接调用该项目的QR码自动生成方法
(如:
)
时,生成的图像是黑白颠倒的,以下是我改动后的QRCodeWriter类,修改后图像正常了
不知道各位有没有遇过这个问题,具体缘由以及是否会对其他方法有影响我不清楚,请指教
(如:
QRCodeWriter_ED qrwriter = new QRCodeWriter_ED(); ByteMatrix matrix = qrwriter.encode("source", BarcodeFormat.QR_CODE, 200, 200,hints);MatrixToImageWriter.writeToFile(matrix, "png", file);
)
时,生成的图像是黑白颠倒的,以下是我改动后的QRCodeWriter类,修改后图像正常了
不知道各位有没有遇过这个问题,具体缘由以及是否会对其他方法有影响我不清楚,请指教
/* */ package com.google.zxing.qrcode; /* */ /* */ import com.google.zxing.BarcodeFormat; /* */ import com.google.zxing.EncodeHintType; /* */ import com.google.zxing.Writer; /* */ import com.google.zxing.WriterException; /* */ import com.google.zxing.common.ByteMatrix; /* */ import com.google.zxing.qrcode.decoder.ErrorCorrectionLevel; /* */ import com.google.zxing.qrcode.encoder.Encoder; /* */ import com.google.zxing.qrcode.encoder.QRCode; /* */ import java.util.Hashtable; /* */ /* */ public final class QRCodeWriter_ED /* */ implements Writer /* */ { /* */ private static final int QUIET_ZONE_SIZE = 4; /* */ /* */ public ByteMatrix encode(String contents, BarcodeFormat format, int width, int height) /* */ throws WriterException /* */ { /* 42 */ return encode(contents, format, width, height, null); /* */ } /* */ /* */ public ByteMatrix encode(String contents, BarcodeFormat format, int width, int height, Hashtable hints) /* */ throws WriterException /* */ { /* 48 */ if ((contents == null) || (contents.length() == 0)) { /* 49 */ throw new IllegalArgumentException("Found empty contents"); /* */ } /* */ /* 52 */ if (format != BarcodeFormat.QR_CODE) { /* 53 */ throw new IllegalArgumentException("Can only encode QR_CODE, but got " + format); /* */ } /* */ /* 56 */ if ((width < 0) || (height < 0)) { /* 57 */ throw new IllegalArgumentException("Requested dimensions are too small: " + width + 'x' + height); /* */ } /* */ /* 61 */ ErrorCorrectionLevel errorCorrectionLevel = ErrorCorrectionLevel.L; /* 62 */ if (hints != null) { /* 63 */ ErrorCorrectionLevel requestedECLevel = (ErrorCorrectionLevel)hints.get(EncodeHintType.ERROR_CORRECTION); /* 64 */ if (requestedECLevel != null) { /* 65 */ errorCorrectionLevel = requestedECLevel; /* */ } /* */ } /* */ /* 69 */ QRCode code = new QRCode(); /* 70 */ Encoder.encode(contents, errorCorrectionLevel, hints, code); /* 71 */ return renderResult(code, width, height); /* */ } /* */ /* */ private static ByteMatrix renderResult(QRCode code, int width, int height) /* */ { /* 77 */ ByteMatrix input = code.getMatrix(); /* 78 */ int inputWidth = input.getWidth(); /* 79 */ int inputHeight = input.getHeight(); /* 80 */ int qrWidth = inputWidth + 8; /* 81 */ int qrHeight = inputHeight + 8; /* 82 */ int outputWidth = Math.max(width, qrWidth); /* 83 */ int outputHeight = Math.max(height, qrHeight); /* */ /* 85 */ int multiple = Math.min(outputWidth / qrWidth, outputHeight / qrHeight); /* */ /* 90 */ int leftPadding = (outputWidth - (inputWidth * multiple)) / 2; /* 91 */ int topPadding = (outputHeight - (inputHeight * multiple)) / 2; /* */ /* 93 */ ByteMatrix output = new ByteMatrix(outputWidth, outputHeight); /* 94 */ byte[][] outputArray = output.getArray(); /* */ /* 98 */ byte[] row = new byte[outputWidth]; /* */ /* 101 */ for (int y = 0; y < topPadding; ++y) { //下面一行代码原为setRowColor(outputArray[y], -1); /* 102 */ setRowColor(outputArray[y], 0); /* */ } /* */ /* 106 */ byte[][] inputArray = input.getArray(); /* 107 */ for (int y = 0; y < inputHeight; ++y) /* */ { /* 109 */ for (int x = 0; x < leftPadding; ++x) { //原为row[x] = -1; /* 110 */ row[x] = 0; /* */ } /* */ /* 114 */ int offset = leftPadding; /* 115 */ for (int x = 0; x < inputWidth; ++x) { //原为byte value = (inputArray[y][x] == 1) ? 0 : -1; /* 116 */ byte value = (inputArray[y][x] == 1) ? -1 : 0; /* 117 */ for (int z = 0; z < multiple; ++z) { /* 118 */ row[(offset + z)] = value; /* */ } /* 120 */ offset += multiple; /* */ } /* */ /* 124 */ offset = leftPadding + inputWidth * multiple; /* 125 */ for (int x = offset; x < outputWidth; ++x) { //原为row[x] = -1; /* 126 */ row[x] = 0; /* */ } /* */ /* 130 */ offset = topPadding + y * multiple; /* 131 */ for (int z = 0; z < multiple; ++z) { /* 132 */ System.arraycopy(row, 0, outputArray[(offset + z)], 0, outputWidth); /* */ } /* */ /* */ } /* */ /* 137 */ int offset = topPadding + inputHeight * multiple; /* 138 */ for (int y = offset; y < outputHeight; ++y) { /* 139 */ setRowColor(outputArray[y], 0); /* */ } /* */ /* 142 */ return output; /* */ } /* */ /* */ private static void setRowColor(byte[] row, byte value) { /* 146 */ for (int x = 0; x < row.length; ++x) /* 147 */ row[x] = value; /* */ } /* */ }
3 楼
zcbbupt
2010-06-11
能详细讲一下怎么使用这个开源项目嘛!
2 楼
sinfrancis
2010-06-07
贝壳水母 写道
毕业设计刚搞的就是QRCODE,这个项目帮了不少忙
此类库做条形码扫描有很大的帮助。
1 楼
贝壳水母
2010-06-04
毕业设计刚搞的就是QRCODE,这个项目帮了不少忙
发表评论
-
抓取Android WebView截屏
2011-08-19 21:33 7585一般使用setDrawingCacheEnabled(true ... -
Android bitmap优化
2011-08-11 17:02 5886直接使用ImageView显示 ... -
Android模拟器更改分辨率后 无法取得分辨率问题
2011-05-11 21:06 2788在PC上更改模拟器分辨率为480*800 (如果你的PC界面 ... -
获取屏幕硬件分辨率方法 收藏
2011-05-11 16:28 1878TextView tv=(TextVie ... -
Bytecode for the Dalvik VM
2011-05-10 22:35 1316http://www.netmite.com/android/ ... -
Android DEX反编译后部分代码解析
2011-05-10 22:07 3861一个private 方法 private Stri ... -
反编译并且修改Android APK包
2011-05-10 16:57 3057為了某個實驗的動機,我們評估反編譯 Android ... -
Android Ant编译时候进行混淆
2010-10-18 13:49 3802版权所有,欢迎转载,转载请注明 : SinFrancis h ... -
自定义Ant Task
2010-09-13 17:58 2960版权所有,欢迎转载,转载请注明 : SinFrancis h ... -
Android自动打包、签名、优化、上传ANT脚本
2010-07-26 16:51 13929版权所有,欢迎转载,转载请注明 : SinFrancis h ... -
Android自定义含有CheckBox的Adapter遇到的问题
2010-06-23 13:48 4082版权所有,欢迎转载,转载请注明 : SinFrancis h ... -
Android QQ,一个WEBOS APP诞生!!(两个QQ对比!)
2010-04-10 12:05 1842请看这个大哥的言论 http://linuxtoy.or ... -
Android 、BlackBerry 文本对齐方式对比
2010-02-22 13:11 1772版权所有,欢迎转载,转载请注明 : SinFrancis h ... -
教你如何开关Android的APN网络
2010-01-08 11:36 5967版权所有,转载请注明来自Mobile Developer (h ... -
史上最强NDK入门项目实战
2009-10-10 13:29 2661以下内容Sinfrancis版权所有,专注请注明来自 htt ... -
使用TimerTask控制ProgressBar
2009-10-10 13:21 1040以下内容Sinfrancis版权所有,专注请注明来自 htt ... -
自定义List布局
2009-10-10 13:19 1853以下内容Sinfrancis版权所有,专注请注明来自 htt ... -
重画Progressbar的进度
2009-10-10 13:15 1907以下内容Sinfrancis版权所有,专注请注明来自 htt ... -
谈谈Android中文短信的实现
2009-10-10 13:13 2139似 乎Google在推出G1时 ... -
模拟器互发短信
2009-10-10 13:11 1254以下内容Sinfrancis版权所有,专注请注明来自 htt ...
相关推荐
这是一个PHP二维码在线生成源码,采用的是PHP QR Code类库生成,在生成时调用这个类文件即可,用此方法生成二维码,相对来说是比较简单的了。这个二维码生成用法也挺简单,直接在文本框中输入文字或网址后,单击按钮...
我们要生成二维码都需要借助一些类库来实现了,下面我介绍利用PHP QR Code生成二维码吧,生成方法很简单,下面我来介绍一下. ...例子,使用PHP QR Code类库创建二维码。 1,浏览器输出: <? include "php
介绍一个支持二维码读取的php类库,引入即可使用,这个php二维码读取类库支持多种二维码的读取。
QR Code Data Matrix PDF 417 Bookland/ISBN Codabar Code 11 Code 128 Code 128-A Code 128-B Code 128-C Code 39 Code 39 Extended Code 93 EAN-13 EAN-8 FIM Interleaved 2 of 5 ITF-14 LOGMARS MSI 2 Mod 10 MSI...
QR Code Data Matrix PDF 417 Bookland/ISBN Codabar Code 11 Code 128 Code 128-A Code 128-B Code 128-C Code 39 Code 39 Extended Code 93 EAN-13 EAN-8 FIM Interleaved 2 of 5 ITF-14 LOGMARS MSI 2 Mod 10 MSI...
PHPqrCode是一个PHP二维码生成类库,利用它可以轻松生成二维码,下载类库后,只需要使用phpqrcode.php就可以生成二维码了,当然您的PHP环境必须开启支持GD2。
将字符串生成二维码。能够将一个字符串(NSString)转换成一个二维码图像(UIImage)。代码中用到了类库libqrencode。 注意:请在Mac下解压使用
条形码、二维码是当前数字世界最常用的编码格式,作者将相关编码生成类库打包形成DLL,5分钟学会使用,方便使用: 1、将StoneQrBarcode.h、StoneQrBarcode.lib和StoneQrBarcode.dll三个文件拷贝到项目子目录下,并在...
HP QR Code是一个PHP二维码生成类库,利用它可以轻松生成二维码,官网提供了下载和多个演示demo,查看地址: http://phpqrcode.sourceforge.net/ 下载官网提供的类库后,只需要使用phpqrcode.php就可以生成二维码了...
支持一维码EAN8, EAN13, UPCA, CODE39, CODE128, ITF,二维码QR_CODE的生成和读取。 本类库基于ZXing条形码库修改而来,主要的改动: * 取消支持部分条形码,较少库文件大小。 * 拆分为barcodelib.swc和barcodelib...
C#编写的实现条形码和QR二维码读取和生成的类库。支持读取QR Code,Aztec Code,Data Matrix,MaxiCode,USPS OneCode,IM Barcode; SharpBarcode也支持Code93,Code129,PDF417,Rss14,GS1,UPC-A,UPC-E,EAN-8,EAN-13,...
QR Code ITF Codabar RSS-14 (all variants) Data Matrix PDF 417 ('alpha' quality) Aztec ('alpha' quality) 同时官网提供了 Android、cpp、C#、iPhone、j2me、j2se、jruby、objc、rim、symbian等多种应用...
今天刚刚编译的二维码类库,绝对支持中文! 使用方法(先引用dll) 示例: QRCodeEncoder qrCodeEncoder = new QRCodeEncoder(); qrCodeEncoder.QRCodeEncodeMode = QRCodeEncoder.ENCODE_MODE.BYTE; qrCodeEncoder....
zxing.java源码解析 简介 条形码(一维码)和二维码 解决方案 barcode4j、zxing barcode4j开源Java条形码生成库,j适合生成条形码,不适合生成二维码。 zxing是由google开源的...CODE的流行,所以二维码又叫做QR code。
PHP QR Code是一个PHP二维码生成类库,利用它可以轻松生成二维码
二维码就是用在平面上用特定的几何图形记录数据信息的,QR码是常见的一种二维码。推荐使用生成QR码的php类库PHP QR Code,下面是使用示例
1.支持PDF417,QR_Code,DataMatrix和Aztec等多种二维码 2.各种条码都符合国家标准和ISO标准。 3.提供编码多种字符集选择 4.采用统一编码接口 5.提供两种常用编码方式 5.1通过内容大小决定条码图像区域 5.2根据...
5、生成多种像 QR Code, Code 39, Code 128, UPC,EAN这样的类型的1维和2维条形码 6、兼容最新的条形码ISO标准 7、容易将URLs、联系信息等信息转换成QR Code和Data Matrix 8、可靠成熟的Android条形码生成类库
crossing”)是一个支持多种格式的条形码和二维码图形解析的开源Java类库,同时它也提供了其他语言的接口。 解码时支持格式有:UPC-A、UPC-E、EAN-8、EAN-13、Code 39、Code 93、Code 128、ITF、Codabar、MSI、RSS-...