zxing

ZXing.Net Encode string to QR Code in CF

眉间皱痕 提交于 2019-11-30 08:52:32
How could I encode my string into a QR Code using ZXing.Net ? I can already decode, but having problems in encoding. It has an error that says: no encoder available for format AZTEC . Here is my code: IBarcodeWriter writer = new BarcodeWriter(); Bitmap barcodeBitmap; var result = writer.Encode("Hello").ToBitmap(); barcodeBitmap = new Bitmap(result); pictureBox1.Image = barcodeBitmap; Michael You doesn't fully initialize the BarcodeWriter. You have to set the barcode format. Try the following code snippet: IBarcodeWriter writer = new BarcodeWriter { Format = BarcodeFormat.QR_CODE }; var result

With Zxing retiring for iOS, which barcode-scanner to switch to?

我的梦境 提交于 2019-11-30 08:45:55
I have implemented ZXing to my iOS-app, however I am questioning it's maintainability as not long ago it was announced that ZXing to iOS is retiring: Retiring C++, Objective C code I've also read that there might be compatibility issues with the newer phones iPhone 5S.. Also running Xcode's static code analysis on the Zxing-library reveals memory errors, I'm not sure if these errors are false positive or not, but they make me doubt Zxing even more. Further, the performance of Zxing compared to other barcode scanners feels subpar. So my question is, what is the best alternative? I hear a lot of

android: zxing barcode scan successful but not returning from activity

廉价感情. 提交于 2019-11-30 08:06:03
问题 I am successfully using zxing to scan codes, by calling the installed barcode reader's intent, but when it beeps and indicates a good scan I expect the zxing activity would return control so I can process the result, but it sits there and tries to scan again. I have to press the back button and then it returns and I can do the next step. Is there some obvious flag I'm missing when I call the scanner? Any advice gratefully received. Many thanks. Here's my code: public boolean onTouchEvent

How to import ZXING to android studio?

為{幸葍}努か 提交于 2019-11-30 06:57:06
I use android studio I want to import 'ZXING' in my application, I find many articles and found the following site https://github.com/zxing/zxing/ I downloaded the ZIP and unzip, and find some tutorials But it does not seem to be too detailed about the details, what I need to import? To achieve QRCode scan I still have no idea how to do it 4/14 I tried Lennon URL provided "zxing-android-minimal" And import the 'gradle-wrapper.jar' But when I wrote new IntentIntegrator (this) .initiateScan (); Still appear "Can not resolve symbol 'IntentIntegrator" message https://www.dropbox.com/s

基于zxing-lib三步实现Android二维码应用

会有一股神秘感。 提交于 2019-11-30 06:51:04
只需要基于开源项目zxing-lib,便可轻松创建独立二维码App,也可将二维码功能集成进App内。本文也是zxing-lib的使用文档。同时抛砖引玉,欢迎大家一起共建zxing-lib。 项目地址: https://github.com/wangym/zxing-client-android 遵循协议: Apache License Version 2.0 简介:zxing-lib是一款开源二维码扫码库,基于 ZXing 进行剪裁和二次开发,支持更多的个性扩展功能,全库仅52KB,以Android library project输出,能被快速使用和集成。 (以下步骤基于已有Android开发经验为前提) 1、环境准备: 检出zxing-lib项目并导入IDE git clone git@github.com:wangym/zxing-client-android.git 导入IDE后将zxing-lib设为Android library project,并以library方式引入你正在开发的Android代码工程内 2、调用扫码: 调用zxing-lib库的扫码界面 /** * @author yumin */ public class MainActivity extends Activity { /** * */ private static final int

【基于zxing的编解码实战】精简Barcode Scanner篇

僤鯓⒐⒋嵵緔 提交于 2019-11-30 06:50:51
通过 《【搞定条形码】zxing项目源码解读(2.3.0版本,Android部分)》 的分析,现在可以实现最终目标了:精简Barcode Scanner并将其中的编码和解码分离为两个独立的部分,方便日后快速集成到自己的项目中去。 编码 在上一篇分析中,对于编码部分已经有所透露,核心部分只有两个package。现在将分享的部分再去掉分享app、分享书签的功能,保留分享剪切板和分享联系人以及编码文本的功能: 编码部分的逻辑清晰,代码组织整齐,在前面了解zxing整体结构的基础上一直做减法即可。 精简过后该项目起名为 XBarcodeGenerator 可以实现的功能包括: 分享联系人 分享剪切板 编码输入文本 主界面布局稍稍修改了下,新增了一个按钮。代码托管至: Zxing-Simplification 解码 在Barcode Scanner的基础上,做出以下调整: 去掉编码部分。去掉整个com.google.zxing.client.android.encode包及相应布局 去掉分享部分。去掉com.google.zxing.client.android.share包及相应布局 精简设置。去掉“自定义搜索网址”,修改前灯的描述,默认使用自动对焦,去掉搜索国家,没有持续关注 调整横屏为竖屏展示 美化viewfinderview(可选) 调整横屏为竖屏进行扫描共分为5步: 1.

Android微信扫描二维码登入实现 基于ZXing开源工程

一个人想着一个人 提交于 2019-11-30 06:50:36
项目需求,做一个类似微信扫描二维码,网页端登陆的功能实现。 利用开源项目ZXing来实现。 ZXing是一个开源Java类库用于解析多种格式的1D/2D条形码。目标是能够对QR编码、Data Matrix、UPC的1D条形码进行解码。 其提供了多种平台下的客户端包括:J2ME、J2SE和Android。 ZXing主页: http://code.google.com/p/zxing/ 1.Download 下载ZXing-2.1,解压后找到所需要的文件夹:core 和 android。core是核心库,android是在android平台下的二维码扫描实现源码 2.Build 在ZXing-2.1下面有不同平台实现方式的文件夹,每个下面都有 一个名为 build.xml的Ant编译文件。首先我们利用Ant工具和这个文件,将core编译成所需要的库。如果你没有Ant,可以去 http://ant.apache.org 下载(mac下默认已经安装)。编译很简单,直接cd到core目录,然后ant即可: cd core ant 3.import 导入android工程,然后 将编译好的core.lib 添加到工程中 我已经将我编译好的lib和 Barcode Scanner 4.3.1 工程放到github,可以直接下载运行 Barcode Scanner 4.3.1: https:/

基于zxing生成与解析二维码、条形码

限于喜欢 提交于 2019-11-30 06:50:25
基于zxing( https://github.com/zxing/zxing )与maven,针对二维码(包括带图片的二维码)、条形码进行了简单的封装,以便在项目中更好的利用。 ZXing是一个开源Java类库用于解析多种格式的1D/2D条形码。目标是能够对QR编码、Data Matrix、UPC的1D条形码进行解码。 其提供了多种平台下的客户端包括:J2ME、J2SE和Android 关于二维码的生成细节与原理,请参考: http://coolshell.cn/articles/10590.html package com.qrcode; import java.awt.Color; import java.awt.Graphics2D; import java.awt.Image; import java.awt.geom.AffineTransform; import java.awt.image.AffineTransformOp; import java.awt.image.BufferedImage; import java.io.File; import java.io.FileOutputStream; import java.io.IOException; import java.util.HashMap; import java.util.Map;

Java js 生成二维码 解析二维码

点点圈 提交于 2019-11-30 06:50:13
1.二维码分类   二维条码也有许多不同的码制,就码制的编码原理而言,通常分为三种类型。 线性堆叠式二维码 编码原理: 建立在一维条码基础之上,按需要堆积成两行或多行。 图示: 2. 矩阵式二维码 最常用编码,原理: 在一个矩形空间通过黑白像素在矩阵中的不同分布进行编码。在矩阵相应的位置上,用点(方点、圆点或其它形状)的出现表示二进制“1”,点的不出现表示二进制的“0” 图示: 3. 邮政码 通过不同长度的条进行编码,主要用于邮政编码。 2.QR Code   现在最常用的就是这种,咱们现在主要介绍的也是这种。为啥这种使用二维码那么受反应呢?主要QR Code这种二维码有如下优点: 识读速度快 数据密度大 占用空间小 2.1 QR Code介绍 2.2 QR Code 结构 大家可以了解下二维码的结构,知道大概就行了,如果想了解详细信息的话可以自行百度,国家有详细的二维码规范。 3.后台JAVA代码实现二维码(QR Code)生成   这里介绍如下两种实现方式: Java 后台实现,主要使用zxing和qrcodejar等第三方jar包。 前端javascript实现,主要使用jquery.qrcode.js 3.1 使用zxing生成二维码 3.1.1 zxing相关网站 zxing的GitHub zxing的Java文档 3.1.2 生成zxing jar包

ZXing读写二维码,桌面和手机的不同用法

梦想与她 提交于 2019-11-30 06:50:00
虽然ZXing是用Java实现的Barcode开源库,但是并不代表桌面上实现的Barcode应用在手机上也可以直接使用。因为Android的Java接口有很多是不同的。这里分享下Java Barcode生成和读取的不同用法。 参考原文: How to Write and Read QR Code with ZXing in Java 作者: Desmond Shaw 翻译: yushulx 获取ZXing源码 之前ZXing是放在Google Code上的,现在已经全部移到了GitHub上。命令行获取: git clone https://github.com/zxing/zxing 在工程中添加ZXing 工程中导入ZXing有两方方法: 把ZXing编译成jar包,导入到工程中使用。比如在Android Studio中可以新建一个module,把ZXing源码导入之后就可以build出一个jar包。 直接使用ZXing源码。在工程属性中选择 Project Properties > Java Build Path > Source > Link Source 。确定输入正确的folder名称,不然会出现大量的package错误。 ZXing源码解析 要生成二维码,需要用到Writer类。搜索 implements Writer 可以看到所有ZXing支持的Barcode