zxing

Zxing library cannot be resolved

亡梦爱人 提交于 2019-12-05 23:57:54
I am developing app with zxing library. I imported the zxing project into my work place. When i importing there were some problems i faced. Compile the project by java 1.7 . I done it. CameraConfigurationUtils was missing. I copied from the library source . Resource id's cannot be used to check in the switch case . I changed it to if else . But finally there is a broblem in the 1. emailResult.getTos() was not resolved in EmailAddressResultHandler 2. Then i built the project there comes the problem R.java cannot be resolved throughout my application. What i am doing wrong? I think you used the

使用zxing生成二维码不带logo

风流意气都作罢 提交于 2019-12-05 23:57:14
一,首先在maven中添加一下jar包 <dependency> <groupId>com.google.zxing</groupId> <artifactId>core</artifactId> <version>3.3.0</version> </dependency> 然后新建个工具类 QrcodeUtil // 图片宽度的一半 private static final int width = 500; private static final int height = 500; private static final int BLACK = 0xFF000000; private static final int WHITE = 0xFFFFFFFF; //生成二维码存放路径 private static final String destImagePath="d:\\qrcode.jpg"; //扫描二维码跳转页面 private static final String content="http://www.baidu.com"; // 二维码写码器 private static MultiFormatWriter multiWriter = new MultiFormatWriter(); /** * 生成二维码 * * @param content

How to obtain scanned barcode type with zxing library?

房东的猫 提交于 2019-12-05 17:45:13
How i can obtain bar code type with zxing library? Delegate method return only barcode in text. Jacob Jennings The delegate call back is, - (void)decoder:(Decoder *)decoder didDecodeImage:(UIImage *)image usingSubset:(UIImage *)subset withResult:(TwoDDecoderResult *)twoDResult { The readers property in Decoder.mm is a list of FormatReaders. @interface FormatReader : NSObject { zxing::Reader *reader_; } The reader_ variable in FormatReader will be a C++ subclass of zxing::Reader, like QRCodeReader. Checking this class name will help identify what symbology you're getting. Beware some of them

Zxing barcode camera options

孤者浪人 提交于 2019-12-05 14:47:59
I want to integrate the zing barcode scanner to my android application. so i used zing integrator as follows public Button.OnClickListener mScan = new Button.OnClickListener() { public void onClick(View v) { Intent intent = new Intent("com.google.zxing.client.android.SCAN"); intent.setPackage("com.google.zxing.client.android"); intent.putExtra("SCAN_MODE", "QR_CODE_MODE"); startActivityForResult(intent, 0); }};public void onActivityResult(int requestCode, int resultCode, Intent intent) { if (requestCode == 0) { if (resultCode == RESULT_OK) { String contents = intent.getStringExtra("SCAN_RESULT

zxing pdf417 size of the image

梦想的初衷 提交于 2019-12-05 11:12:36
I am testing PDF417 zxing libs, but resizing the output doesn't work as I exptected. The output has always the same aspect ratio. Changing the dimensions doesn't influence the output, I tried EncodeHintType as suggested in other messages, but with no success. Here the code: public class PDF417demo { public static void main(String[] args) { String barcodeMessage = "test"; final String PATH = "/home/test/"; final int WIDTH = 30; BitMatrix bitMatrix; Writer writer; try { Map hints = new HashMap(); hints.put(EncodeHintType.MARGIN, 2); hints.put(EncodeHintType.PDF417_DIMENSIONS, new Dimensions(20

Extract the data from QR Codes and create a new QR code with colour

自作多情 提交于 2019-12-05 09:37:17
Has anyone heard of this before ? Extract the QR Codes (all the QR Codes must be in same Width and Height {square}) and get the data from each QR Code , and combine them. Then get the every pixel value from each QR Code and change them to hexadecimal . You will give #FFFFFFFF , #FF000000 , #00000000 (white,black, transparent) and the like (but for black and white QR Code , it would only 2 of them). Then for each value from each QR Code, by creating a new colour QR Code which the colour is according to the value from each hexadecimal and the content of the new colour QR Code will have the

ChecksumException in zxing QRCodeReader when NOT reading a QR-code with an URL

拟墨画扇 提交于 2019-12-05 08:29:52
The following code works perfectly and fast if I am scanning a QR code with an URL. However, if I am decoding a QR code with a simple string or number sequence (which is what I would like to do), it randomly works sometimes, but 99% of the time it keeps failing with a ChecksumException. if (webcam.isOpen()) { if ((image = webcam.getImage()) == null) { continue; } LuminanceSource source = new BufferedImageLuminanceSource(image); BinaryBitmap bitmap = new BinaryBitmap(new HybridBinarizer(source)); try { result = new QRCodeReader().decode(bitmap); } catch (NotFoundException e) { //exception

zxing integration- camera error

♀尐吖头ヾ 提交于 2019-12-05 07:35:14
问题 i'm working on an android app with zxing barcode scanner integration. it's camera preview with a button which initiate barcode scanner. (I used this) App works fine, but only first scan. When i want to do another scan: camera error occure: screenshot here When i restart the phone, again only first scan works. Can anybody help please?Im beginner.(and sorry for my english) **class Preview** @Override public void surfaceCreated(SurfaceHolder holder) { camera = Camera.open(); } @Override public

DataMatrix-encoding with zxing only generates 14px bitmap

狂风中的少年 提交于 2019-12-05 05:09:14
I'm using zxing to generate barcodes with different types (EAN, 2of5 and DataMatrix). Generating in general works fine. The only problem I currently have is that zxing only generates a 14x14 pixel bitmap which is way too small. But only when using DataMatrix! EAN13, 2of5/ITF and QR-Codes work perfect with the same code. My code: BitMatrix bitMatrix = new DataMatrixWriter().encode(message, BarcodeFormat.DATA_MATRIX, 1080, 1080, null); int height = bitMatrix.getHeight(); //height is always 14, it doesn't matter what value I pass to the encoder As you can imagine this looks pretty shitty on a

ANDROID: Saving PreviewCallback image as a .jpg from a byte array results in a corrupt file

早过忘川 提交于 2019-12-05 03:43:07
问题 I have been augmenting the QR scanning library Zxing to save a photo instantly upon scan. I was advised to do so within the onPreviewFrame method within PreviewCallback.java as thus: public void onPreviewFrame(byte[] data, Camera camera) { Point cameraResolution = configManager.getCameraResolution(); Handler thePreviewHandler = previewHandler; YuvImage im = new YuvImage(data, ImageFormat.NV21, 1200, 800, null); Rect r = new Rect(0, 0, 1200, 800); ByteArrayOutputStream baos = new