zxing

how to fix an unclear qr code image generated using zxing 2.1?

廉价感情. 提交于 2019-12-02 00:50:18
问题 I have generated a QR code image using zxing 2.1 library, but the image is very blurry and unclear. Where might I be possibly going wrong? 回答1: The generation happens at a lower level and then is scaled with a width and height request. You can request generation at a higher width and height. ZXing exposes BarcodeOptions in the viewer that you can set. In your model you can do this: public EncodingOptions BarcodeOptions => new EncodingOptions() { Height = 100, Width = 100, PureBarcode = true }

how to fix an unclear qr code image generated using zxing 2.1?

我的未来我决定 提交于 2019-12-01 20:16:56
I have generated a QR code image using zxing 2.1 library, but the image is very blurry and unclear. Where might I be possibly going wrong? The generation happens at a lower level and then is scaled with a width and height request. You can request generation at a higher width and height. ZXing exposes BarcodeOptions in the viewer that you can set. In your model you can do this: public EncodingOptions BarcodeOptions => new EncodingOptions() { Height = 100, Width = 100, PureBarcode = true }; Then in your XAML it might look like this: <z:ZXingBarcodeImageView BarcodeFormat="QR_CODE" HeightRequest=

Create png image from QRCode for iPhone

空扰寡人 提交于 2019-12-01 17:27:35
I've been using zxing to decode QRCodes. I've also now the got the encoder working and can create the QRCode which contains the encoded data. I'm asking if anyone knows how to convert this QRCOde data to a png image. Chris Truman If your app has online access then you can use something like http://www.tag.cx/qr-codes/ Many users are looking for a way to encode QR codes and other codes programmatically on the iPhone. These features have not been ported from Android to iPhone yet as described in this Zxing thread: https://groups.google.com/group/zxing/browse_thread/thread/7325ed13cc49122c

Create png image from QRCode for iPhone

吃可爱长大的小学妹 提交于 2019-12-01 16:12:44
问题 I've been using zxing to decode QRCodes. I've also now the got the encoder working and can create the QRCode which contains the encoded data. I'm asking if anyone knows how to convert this QRCOde data to a png image. 回答1: If your app has online access then you can use something like http://www.tag.cx/qr-codes/ Many users are looking for a way to encode QR codes and other codes programmatically on the iPhone. These features have not been ported from Android to iPhone yet as described in this

How can I send a PNG of a QR-code in a HTTP response body (with Spark)?

蹲街弑〆低调 提交于 2019-12-01 16:11:59
I want to generate a QR-code image, convert it to PNG and return it as a HTTP response to my client. To generate the QR-code I use ZXing. I already tested the conversion part by writing using a FileOutputStream with MatrixToImageWriter.writeToStream(...) . That works like a charm. The web framework I am currently using is Spark (Version 1.1.1). The return of the handle(...) -method is set as the response body. What am I doing wrong here? With the current solution I get The image "http://localhost:4567/qrcode" cannot be displayed because it contains errors when performing the GET-request with

How can I send a PNG of a QR-code in a HTTP response body (with Spark)?

北城以北 提交于 2019-12-01 15:48:56
问题 I want to generate a QR-code image, convert it to PNG and return it as a HTTP response to my client. To generate the QR-code I use ZXing. I already tested the conversion part by writing using a FileOutputStream with MatrixToImageWriter.writeToStream(...) . That works like a charm. The web framework I am currently using is Spark (Version 1.1.1). The return of the handle(...) -method is set as the response body. What am I doing wrong here? With the current solution I get The image "http:/

How to decode a barcode from camera preview using zxing library in android?

依然范特西╮ 提交于 2019-12-01 13:20:19
I want to implement standalone scanner in my android application.I'm using zxing's core.jar library in my project. I need to decode a barcode from camera preview.But i don't know how to implement it.Because there is no official documentation. Can you provide me a simple example on followings things? 1.Initialize the camera and getting preview. 2.Decode the barcode from preview. or Is there any example project to do this? Take a look at my simple implementation: https://github.com/piobab/code-scanner I use ZBar library but if you want you can change ZBarScannerView.java implementation to

Class not found when using zxing

五迷三道 提交于 2019-12-01 12:07:22
So i'm developing an app that can scan QR codes. I downloaded the ZXing library, built it using apache ant to get the core.jar, put it in my project folder and added it as a jar to the build path. No when i try do the following: Intent intent = new Intent("com.google.zxing.client.android.SCAN"); intent.putExtra("SCAN_MODE", "QR_CODE_MODE"); startActivityForResult(intent, 0); I get the following error: 08-14 18:52:01.191: E/AndroidRuntime(617): FATAL EXCEPTION: main 08-14 18:52:01.191: E/AndroidRuntime(617): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.android

zxing代码中core和javase模块介绍

白昼怎懂夜的黑 提交于 2019-12-01 11:55:26
zxing的源码中包含很多的模块,模块列表如下: core: The core image decoding library, and test code javase: J2SE-specific client code zxingorg: The source behind zxing.org/w zxing.appspot.com: The source behind our web-based barcode generator android: Android client, called Barcode Scanner androidtest: Android test app android-integration: Supports integration with our Barcode Scanner app via Intent actionscript: partial port to Actionscript glass-mirror: partial implementation for the Google Glass Mirror API jruby: Ruby wrapper 这里主要介绍core和javase。 core为zxing的核心代码,包括encode和decode的代码。 javase可以定义为一个辅助代码,主要提供一些工具类。比如

Android平台利用ZXING生成二维码图片

好久不见. 提交于 2019-12-01 11:54:53
zxing是google的一个开源二维码项目,目前基本上和二维码打交道的东西,都会用到它. 最近项目中用到了android手机需要根据提供的字符串生成二维码图片,之前用zxing做过二维码解码,编码还没做过,看了一些demo都是用到了zxing的j2se包的内容,这个在android或者其他平台上显然无法实现,所以我们要利用zxing生成二维矩阵,然后根据android平台的提供的api来生成图片. [java] view plain copy /** * 用字符串生成二维码 * @param str * @author zhouzhe@lenovo-cw.com * @return * @throws WriterException */ public Bitmap Create2DCode(String str) throws WriterException { //生成二维矩阵,编码时指定大小,不要生成了图片以后再进行缩放,这样会模糊导致识别失败 BitMatrix matrix = new MultiFormatWriter().encode(str,BarcodeFormat.QR_CODE, 300 , 300 ); int width = matrix.getWidth(); int height = matrix.getHeight(); /