Examples of QRCodeReader


Examples of com.google.zxing.qrcode.QRCodeReader

    // convert the image to a binary bitmap source
    LuminanceSource source = new BufferedImageLuminanceSource(image);
    BinaryBitmap bitmap = new BinaryBitmap(new HybridBinarizer(source));

    // decode the barcode
    QRCodeReader reader = new QRCodeReader();

    try {
      @SuppressWarnings("rawtypes")
      Hashtable hints = new Hashtable();
      Result result = reader.decode(bitmap, hints);
      log.info("Decoded image successfully, result was : '" + result.getText() + "'");

      return result.getText();
    } catch (ReaderException e) {
      // the data is improperly formatted
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.