zxing

利用zxing读写PDF417码制的二维码

柔情痞子 提交于 2019-12-01 11:52:56
项目中需要用到二维码,二维码的码制是PDF417,在做了一番研究之后发现zxing是个不错的开源工具(代码托管在google上面)。为什么选择zxing,由于其他一些工具比如barcode4j(开源,支持读,好像不支持写,最后维护时间在2010年)、barcode(商业版)都不太适合,所以选择了zxing。 zxing并没有提供直接可以使用的jar文件,而是需要自己通过编译源码,生成需要的jar文件。额外说明,zxing利用maven管理自己的代码,并且默认使用了jdk7,代码中也使用了jdk7的一些新特性,基于这些情况,可以适当调整jdk的版本(如果降低jdk的版本,需要改动少量的源码)。 下面直接贴出读写文件的代码: ZxingPdfRead package test; import java.awt.image.BufferedImage; import java.io.File; import java.io.IOException; import java.net.URLDecoder; import java.util.EnumMap; import java.util.Map; import javax.imageio.ImageIO; import com.google.zxing.BinaryBitmap; import com.google.zxing

How to apply Reed-Solomon algorithm using zxing in C#

谁都会走 提交于 2019-12-01 11:29:57
I want to transmit binary data over a noisy channel. I read that a good ECC algorithm to detect errors is Reed-Solomon. The problem is i don't understand the input for this algorithm. here is my naive failed attempt with zxing.net: int[] toEncode = { 123,232,432}; var gf = GenericGF.AZTEC_DATA_12; ReedSolomonEncoder rse = new ReedSolomonEncoder(gf); rse.encode(toEncode, 2); ReedSolomonDecoder rsd = new ReedSolomonDecoder(gf); rse.encode(toEncode, 2); please explain to me the input for the encoder and decoder. Is this the implementation you are using here: ReedSolomonEncoder.cs ? If so, to

Android Studio (0.3.2) and ZXing

我是研究僧i 提交于 2019-12-01 10:33:44
问题 I cannot get ZXing to work in Android Studio. I have generated the core.jar file using Ant, and the same jar worked fine using Eclipse. Now I must get it working in Android Studio (0.3.2). Here is what I have tried but to no avail so far: Copy the core.jar file into the PROJECTNAMEProject/PROJECTNAME/libs/ Right click > Add as library Choose Project Library as the 'Level' in the Create Library dialog, with 'Add to module' set to the PROJECTNAME folder. I have tried the Global and Module

How to apply Reed-Solomon algorithm using zxing in C#

好久不见. 提交于 2019-12-01 08:54:43
问题 I want to transmit binary data over a noisy channel. I read that a good ECC algorithm to detect errors is Reed-Solomon. The problem is i don't understand the input for this algorithm. here is my naive failed attempt with zxing.net: int[] toEncode = { 123,232,432}; var gf = GenericGF.AZTEC_DATA_12; ReedSolomonEncoder rse = new ReedSolomonEncoder(gf); rse.encode(toEncode, 2); ReedSolomonDecoder rsd = new ReedSolomonDecoder(gf); rse.encode(toEncode, 2); please explain to me the input for the

Android drawable resource id conflict?

╄→гoц情女王★ 提交于 2019-12-01 08:14:18
I've set up the /android project of ZXing 1.7 as a library referenced by my main android app project. As a quick test / proof of concept, I have used the CaptureActivity, in the same manner as described here: http://damianflannery.wordpress.com/2011/06/13/integrate-zxing-barcod ... Mostly, things work well, I can launch the CaptureActivity and receive the scanned data in my activity that launched it. However, I get some really strange behaviour, which I think may be related to resource IDs conflicting between my project and the /android ZXing project. This will take some explaining so please

Can I control the flashlight without using android.hardware.Camera?

佐手、 提交于 2019-12-01 07:54:09
The use of front light option with zxing1.6 barcode scanner does not work on my Nexus One. I need to be able to use the flashlight in my app, but you can't have two instances of the camera running. Is there a way to use the flashlight without accessing the camera? Or can I somehow access a camera that is already in use? I am using the Google IntentIntegrator.java patch to be able to scan barcodes. The short answer is "no"; the front LED is controlled as a flash mode, which is a property of the camera. It is mode "torch". And no two apps can't open the camera at the same time. (A longer answer

Can I control the flashlight without using android.hardware.Camera?

你。 提交于 2019-12-01 04:23:19
问题 The use of front light option with zxing1.6 barcode scanner does not work on my Nexus One. I need to be able to use the flashlight in my app, but you can't have two instances of the camera running. Is there a way to use the flashlight without accessing the camera? Or can I somehow access a camera that is already in use? I am using the Google IntentIntegrator.java patch to be able to scan barcodes. 回答1: The short answer is "no"; the front LED is controlled as a flash mode, which is a property

Customized camera view & rotation in Zxing for QR code?

限于喜欢 提交于 2019-12-01 03:47:52
I am working with such a great library zxing to read QR code. I already got QR code successfully. Now, My application runs in landscape mode and camera takes the whole screen and red QR detection rectangle box is in the middle. I wanna change this to portrait mode & replace the camera view only with the red QR detection rectangle box. I change CaptureActivity tag which is inside the zxing library manifest file. android:screenOrientation="portrait" . But found nothing what I actually want. I don't know where I have to change/write code to get this. Md. Saiful Islam I was in same problem and got

How to scan driver's license (PDF417) using xamarin forms + zxing on iOS 10.2

空扰寡人 提交于 2019-12-01 01:27:06
I am using Xamarin forms to write an iOS app and using the ZXing library to scan barcodes. I am trying to read a driver's license (PDF417) barcode, but the library is not able to recognize that barcode. If I include UPC or other barcodes in the PossibleFormats, they are scanned correctly. I am also certain the barcode I am trying to read is PDF417 barcode because Scandit is able to recognize it correctly while using only PDF417 barcode. Here is the code I am using. What do I need to change so that the PDF417 barcode is recognized correctly? async void Handle_Clicked (object sender, System

Customized camera view & rotation in Zxing for QR code?

老子叫甜甜 提交于 2019-12-01 00:59:33
问题 I am working with such a great library zxing to read QR code. I already got QR code successfully. Now, My application runs in landscape mode and camera takes the whole screen and red QR detection rectangle box is in the middle. I wanna change this to portrait mode & replace the camera view only with the red QR detection rectangle box. I change CaptureActivity tag which is inside the zxing library manifest file. android:screenOrientation="portrait" . But found nothing what I actually want. I