Java Code Examples for com.google.zxing.BarcodeFormat#MAXICODE
The following examples show how to use
com.google.zxing.BarcodeFormat#MAXICODE .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: MaxiCodeReader.java From ZXing-Orient with Apache License 2.0 | 6 votes |
@Override public Result decode(BinaryBitmap image, Map<DecodeHintType,?> hints) throws NotFoundException, ChecksumException, FormatException { DecoderResult decoderResult; if (hints != null && hints.containsKey(DecodeHintType.PURE_BARCODE)) { BitMatrix bits = extractPureBits(image.getBlackMatrix()); decoderResult = decoder.decode(bits, hints); } else { throw NotFoundException.getNotFoundInstance(); } ResultPoint[] points = NO_POINTS; Result result = new Result(decoderResult.getText(), decoderResult.getRawBytes(), points, BarcodeFormat.MAXICODE); String ecLevel = decoderResult.getECLevel(); if (ecLevel != null) { result.putMetadata(ResultMetadataType.ERROR_CORRECTION_LEVEL, ecLevel); } return result; }
Example 2
Source File: MaxiCodeReader.java From analyzer-of-android-for-Apache-Weex with Apache License 2.0 | 6 votes |
@Override public Result decode(BinaryBitmap image, Map<DecodeHintType,?> hints) throws NotFoundException, ChecksumException, FormatException { DecoderResult decoderResult; if (hints != null && hints.containsKey(DecodeHintType.PURE_BARCODE)) { BitMatrix bits = extractPureBits(image.getBlackMatrix()); decoderResult = decoder.decode(bits, hints); } else { throw NotFoundException.getNotFoundInstance(); } ResultPoint[] points = NO_POINTS; Result result = new Result(decoderResult.getText(), decoderResult.getRawBytes(), points, BarcodeFormat.MAXICODE); String ecLevel = decoderResult.getECLevel(); if (ecLevel != null) { result.putMetadata(ResultMetadataType.ERROR_CORRECTION_LEVEL, ecLevel); } return result; }
Example 3
Source File: MaxiCodeReader.java From weex with Apache License 2.0 | 6 votes |
@Override public Result decode(BinaryBitmap image, Map<DecodeHintType,?> hints) throws NotFoundException, ChecksumException, FormatException { DecoderResult decoderResult; if (hints != null && hints.containsKey(DecodeHintType.PURE_BARCODE)) { BitMatrix bits = extractPureBits(image.getBlackMatrix()); decoderResult = decoder.decode(bits, hints); } else { throw NotFoundException.getNotFoundInstance(); } ResultPoint[] points = NO_POINTS; Result result = new Result(decoderResult.getText(), decoderResult.getRawBytes(), points, BarcodeFormat.MAXICODE); String ecLevel = decoderResult.getECLevel(); if (ecLevel != null) { result.putMetadata(ResultMetadataType.ERROR_CORRECTION_LEVEL, ecLevel); } return result; }
Example 4
Source File: MaxiCodeReader.java From barcodescanner-lib-aar with MIT License | 6 votes |
@Override public Result decode(BinaryBitmap image, Map<DecodeHintType,?> hints) throws NotFoundException, ChecksumException, FormatException { DecoderResult decoderResult; if (hints != null && hints.containsKey(DecodeHintType.PURE_BARCODE)) { BitMatrix bits = extractPureBits(image.getBlackMatrix()); decoderResult = decoder.decode(bits, hints); } else { throw NotFoundException.getNotFoundInstance(); } Result result = new Result(decoderResult.getText(), decoderResult.getRawBytes(), NO_POINTS, BarcodeFormat.MAXICODE); String ecLevel = decoderResult.getECLevel(); if (ecLevel != null) { result.putMetadata(ResultMetadataType.ERROR_CORRECTION_LEVEL, ecLevel); } return result; }
Example 5
Source File: MaxiCodeReader.java From reacteu-app with MIT License | 6 votes |
@Override public Result decode(BinaryBitmap image, Map<DecodeHintType,?> hints) throws NotFoundException, ChecksumException, FormatException { DecoderResult decoderResult; if (hints != null && hints.containsKey(DecodeHintType.PURE_BARCODE)) { BitMatrix bits = extractPureBits(image.getBlackMatrix()); decoderResult = decoder.decode(bits, hints); } else { throw NotFoundException.getNotFoundInstance(); } ResultPoint[] points = NO_POINTS; Result result = new Result(decoderResult.getText(), decoderResult.getRawBytes(), points, BarcodeFormat.MAXICODE); String ecLevel = decoderResult.getECLevel(); if (ecLevel != null) { result.putMetadata(ResultMetadataType.ERROR_CORRECTION_LEVEL, ecLevel); } return result; }
Example 6
Source File: MaxiCodeReader.java From MiBandDecompiled with Apache License 2.0 | 6 votes |
public Result decode(BinaryBitmap binarybitmap, Map map) { if (map != null && map.containsKey(DecodeHintType.PURE_BARCODE)) { BitMatrix bitmatrix = a(binarybitmap.getBlackMatrix()); DecoderResult decoderresult = d.decode(bitmatrix, map); ResultPoint aresultpoint[] = a; Result result = new Result(decoderresult.getText(), decoderresult.getRawBytes(), aresultpoint, BarcodeFormat.MAXICODE); String s = decoderresult.getECLevel(); if (s != null) { result.putMetadata(ResultMetadataType.ERROR_CORRECTION_LEVEL, s); } return result; } else { throw NotFoundException.getNotFoundInstance(); } }
Example 7
Source File: MaxiCodeReader.java From RipplePower with Apache License 2.0 | 6 votes |
@Override public Result decode(BinaryBitmap image, Map<DecodeHintType, ?> hints) throws NotFoundException, ChecksumException, FormatException { DecoderResult decoderResult; if (hints != null && hints.containsKey(DecodeHintType.PURE_BARCODE)) { BitMatrix bits = extractPureBits(image.getBlackMatrix()); decoderResult = decoder.decode(bits, hints); } else { throw NotFoundException.getNotFoundInstance(); } ResultPoint[] points = NO_POINTS; Result result = new Result(decoderResult.getText(), decoderResult.getRawBytes(), points, BarcodeFormat.MAXICODE); String ecLevel = decoderResult.getECLevel(); if (ecLevel != null) { result.putMetadata(ResultMetadataType.ERROR_CORRECTION_LEVEL, ecLevel); } return result; }
Example 8
Source File: ZXingDecoder.java From react-native-barcode with MIT License | 5 votes |
private static int symbolToFormat(BarcodeFormat symbol) { if (BarcodeFormat.AZTEC == symbol) { return 225; } else if (BarcodeFormat.CODABAR == symbol) { return 38; } else if (BarcodeFormat.CODE_128 == symbol) { return 128; } else if (BarcodeFormat.CODE_39 == symbol) { return 39; } else if (BarcodeFormat.CODE_93 == symbol) { return 93; } else if (BarcodeFormat.DATA_MATRIX == symbol) { return 200; } else if (BarcodeFormat.EAN_13 == symbol) { return 13; } else if (BarcodeFormat.EAN_8 == symbol) { return 8; } else if (BarcodeFormat.ITF == symbol) { return 25; } else if (BarcodeFormat.MAXICODE == symbol) { return 94; } else if (BarcodeFormat.PDF_417 == symbol) { return 57; } else if (BarcodeFormat.QR_CODE == symbol) { return 64; } else if (BarcodeFormat.RSS_14 == symbol) { return 34; } else if (BarcodeFormat.RSS_EXPANDED == symbol) { return 35; } else if (BarcodeFormat.UPC_A == symbol) { return 12; } else if (BarcodeFormat.UPC_E == symbol) { return 9; } else if (BarcodeFormat.UPC_EAN_EXTENSION == symbol) { return 15; } return -1; }
Example 9
Source File: ZXingDecoder.java From react-native-barcode with MIT License | 5 votes |
private static BarcodeFormat formatToSymbol(int format) { if (225 == format) { return BarcodeFormat.AZTEC; } else if (38 == format) { return BarcodeFormat.CODABAR; } else if (128 == format) { return BarcodeFormat.CODE_128; } else if (39 == format) { return BarcodeFormat.CODE_39; } else if (93 == format) { return BarcodeFormat.CODE_93; } else if (200 == format) { return BarcodeFormat.DATA_MATRIX; } else if (13 == format) { return BarcodeFormat.EAN_13; } else if (8 == format) { return BarcodeFormat.EAN_8; } else if (25 == format) { return BarcodeFormat.ITF; } else if (94 == format) { return BarcodeFormat.MAXICODE; } else if (57 == format) { return BarcodeFormat.PDF_417; } else if (64 == format) { return BarcodeFormat.QR_CODE; } else if (34 == format) { return BarcodeFormat.RSS_14; } else if (35 == format) { return BarcodeFormat.RSS_EXPANDED; } else if (12 == format) { return BarcodeFormat.UPC_A; } else if (9 == format) { return BarcodeFormat.UPC_E; } else if (15 == format) { return BarcodeFormat.UPC_EAN_EXTENSION; } return null; }
Example 10
Source File: RCTCameraViewFinder.java From react-native-camera-face-detector with MIT License | 4 votes |
/** * Parse barcodes as BarcodeFormat constants. * * Supports all iOS codes except [code39mod43, itf14] * * Additionally supports [codabar, maxicode, rss14, rssexpanded, upca, upceanextension] */ private BarcodeFormat parseBarCodeString(String c) { if ("aztec".equals(c)) { return BarcodeFormat.AZTEC; } else if ("ean13".equals(c)) { return BarcodeFormat.EAN_13; } else if ("ean8".equals(c)) { return BarcodeFormat.EAN_8; } else if ("qr".equals(c)) { return BarcodeFormat.QR_CODE; } else if ("pdf417".equals(c)) { return BarcodeFormat.PDF_417; } else if ("upce".equals(c)) { return BarcodeFormat.UPC_E; } else if ("datamatrix".equals(c)) { return BarcodeFormat.DATA_MATRIX; } else if ("code39".equals(c)) { return BarcodeFormat.CODE_39; } else if ("code93".equals(c)) { return BarcodeFormat.CODE_93; } else if ("interleaved2of5".equals(c)) { return BarcodeFormat.ITF; } else if ("codabar".equals(c)) { return BarcodeFormat.CODABAR; } else if ("code128".equals(c)) { return BarcodeFormat.CODE_128; } else if ("maxicode".equals(c)) { return BarcodeFormat.MAXICODE; } else if ("rss14".equals(c)) { return BarcodeFormat.RSS_14; } else if ("rssexpanded".equals(c)) { return BarcodeFormat.RSS_EXPANDED; } else if ("upca".equals(c)) { return BarcodeFormat.UPC_A; } else if ("upceanextension".equals(c)) { return BarcodeFormat.UPC_EAN_EXTENSION; } else { android.util.Log.v("RCTCamera", "Unsupported code.. [" + c + "]"); return null; } }