Java Code Examples for com.google.zxing.BarcodeFormat#UPC_EAN_EXTENSION
The following examples show how to use
com.google.zxing.BarcodeFormat#UPC_EAN_EXTENSION .
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: UPCEANExtension2Support.java From ZXing-Orient with Apache License 2.0 | 6 votes |
Result decodeRow(int rowNumber, BitArray row, int[] extensionStartRange) throws NotFoundException { StringBuilder result = decodeRowStringBuffer; result.setLength(0); int end = decodeMiddle(row, extensionStartRange, result); String resultString = result.toString(); Map<ResultMetadataType,Object> extensionData = parseExtensionString(resultString); Result extensionResult = new Result(resultString, null, new ResultPoint[] { new ResultPoint((extensionStartRange[0] + extensionStartRange[1]) / 2.0f, (float) rowNumber), new ResultPoint((float) end, (float) rowNumber), }, BarcodeFormat.UPC_EAN_EXTENSION); if (extensionData != null) { extensionResult.putAllMetadata(extensionData); } return extensionResult; }
Example 2
Source File: b.java From MiBandDecompiled with Apache License 2.0 | 6 votes |
Result a(int i, BitArray bitarray, int j) { int ai[] = UPCEANReader.a(bitarray, j, false, a); StringBuilder stringbuilder = d; stringbuilder.setLength(0); int k = a(bitarray, ai, stringbuilder); String s = stringbuilder.toString(); Map map = a(s); ResultPoint aresultpoint[] = new ResultPoint[2]; aresultpoint[0] = new ResultPoint((float)(ai[0] + ai[1]) / 2.0F, i); aresultpoint[1] = new ResultPoint(k, i); Result result = new Result(s, null, aresultpoint, BarcodeFormat.UPC_EAN_EXTENSION); if (map != null) { result.putAllMetadata(map); } return result; }
Example 3
Source File: UPCEANExtension2Support.java From reacteu-app with MIT License | 6 votes |
Result decodeRow(int rowNumber, BitArray row, int[] extensionStartRange) throws NotFoundException { StringBuilder result = decodeRowStringBuffer; result.setLength(0); int end = decodeMiddle(row, extensionStartRange, result); String resultString = result.toString(); Map<ResultMetadataType,Object> extensionData = parseExtensionString(resultString); Result extensionResult = new Result(resultString, null, new ResultPoint[] { new ResultPoint((extensionStartRange[0] + extensionStartRange[1]) / 2.0f, (float) rowNumber), new ResultPoint((float) end, (float) rowNumber), }, BarcodeFormat.UPC_EAN_EXTENSION); if (extensionData != null) { extensionResult.putAllMetadata(extensionData); } return extensionResult; }
Example 4
Source File: UPCEANExtension5Support.java From reacteu-app with MIT License | 6 votes |
Result decodeRow(int rowNumber, BitArray row, int[] extensionStartRange) throws NotFoundException { StringBuilder result = decodeRowStringBuffer; result.setLength(0); int end = decodeMiddle(row, extensionStartRange, result); String resultString = result.toString(); Map<ResultMetadataType,Object> extensionData = parseExtensionString(resultString); Result extensionResult = new Result(resultString, null, new ResultPoint[] { new ResultPoint((extensionStartRange[0] + extensionStartRange[1]) / 2.0f, (float) rowNumber), new ResultPoint((float) end, (float) rowNumber), }, BarcodeFormat.UPC_EAN_EXTENSION); if (extensionData != null) { extensionResult.putAllMetadata(extensionData); } return extensionResult; }
Example 5
Source File: UPCEANExtension2Support.java From barcodescanner-lib-aar with MIT License | 6 votes |
Result decodeRow(int rowNumber, BitArray row, int[] extensionStartRange) throws NotFoundException { StringBuilder result = decodeRowStringBuffer; result.setLength(0); int end = decodeMiddle(row, extensionStartRange, result); String resultString = result.toString(); Map<ResultMetadataType,Object> extensionData = parseExtensionString(resultString); Result extensionResult = new Result(resultString, null, new ResultPoint[] { new ResultPoint((extensionStartRange[0] + extensionStartRange[1]) / 2.0f, rowNumber), new ResultPoint(end, rowNumber), }, BarcodeFormat.UPC_EAN_EXTENSION); if (extensionData != null) { extensionResult.putAllMetadata(extensionData); } return extensionResult; }
Example 6
Source File: UPCEANExtension2Support.java From RipplePower with Apache License 2.0 | 6 votes |
Result decodeRow(int rowNumber, BitArray row, int[] extensionStartRange) throws NotFoundException { StringBuilder result = decodeRowStringBuffer; result.setLength(0); int end = decodeMiddle(row, extensionStartRange, result); String resultString = result.toString(); Map<ResultMetadataType, Object> extensionData = parseExtensionString(resultString); Result extensionResult = new Result(resultString, null, new ResultPoint[] { new ResultPoint((extensionStartRange[0] + extensionStartRange[1]) / 2.0f, (float) rowNumber), new ResultPoint((float) end, (float) rowNumber), }, BarcodeFormat.UPC_EAN_EXTENSION); if (extensionData != null) { extensionResult.putAllMetadata(extensionData); } return extensionResult; }
Example 7
Source File: UPCEANExtension2Support.java From weex with Apache License 2.0 | 6 votes |
Result decodeRow(int rowNumber, BitArray row, int[] extensionStartRange) throws NotFoundException { StringBuilder result = decodeRowStringBuffer; result.setLength(0); int end = decodeMiddle(row, extensionStartRange, result); String resultString = result.toString(); Map<ResultMetadataType,Object> extensionData = parseExtensionString(resultString); Result extensionResult = new Result(resultString, null, new ResultPoint[] { new ResultPoint((extensionStartRange[0] + extensionStartRange[1]) / 2.0f, (float) rowNumber), new ResultPoint((float) end, (float) rowNumber), }, BarcodeFormat.UPC_EAN_EXTENSION); if (extensionData != null) { extensionResult.putAllMetadata(extensionData); } return extensionResult; }
Example 8
Source File: UPCEANExtension5Support.java From weex with Apache License 2.0 | 6 votes |
Result decodeRow(int rowNumber, BitArray row, int[] extensionStartRange) throws NotFoundException { StringBuilder result = decodeRowStringBuffer; result.setLength(0); int end = decodeMiddle(row, extensionStartRange, result); String resultString = result.toString(); Map<ResultMetadataType,Object> extensionData = parseExtensionString(resultString); Result extensionResult = new Result(resultString, null, new ResultPoint[] { new ResultPoint((extensionStartRange[0] + extensionStartRange[1]) / 2.0f, (float) rowNumber), new ResultPoint((float) end, (float) rowNumber), }, BarcodeFormat.UPC_EAN_EXTENSION); if (extensionData != null) { extensionResult.putAllMetadata(extensionData); } return extensionResult; }
Example 9
Source File: UPCEANExtension2Support.java From analyzer-of-android-for-Apache-Weex with Apache License 2.0 | 6 votes |
Result decodeRow(int rowNumber, BitArray row, int[] extensionStartRange) throws NotFoundException { StringBuilder result = decodeRowStringBuffer; result.setLength(0); int end = decodeMiddle(row, extensionStartRange, result); String resultString = result.toString(); Map<ResultMetadataType,Object> extensionData = parseExtensionString(resultString); Result extensionResult = new Result(resultString, null, new ResultPoint[] { new ResultPoint((extensionStartRange[0] + extensionStartRange[1]) / 2.0f, (float) rowNumber), new ResultPoint((float) end, (float) rowNumber), }, BarcodeFormat.UPC_EAN_EXTENSION); if (extensionData != null) { extensionResult.putAllMetadata(extensionData); } return extensionResult; }
Example 10
Source File: UPCEANExtension5Support.java From analyzer-of-android-for-Apache-Weex with Apache License 2.0 | 6 votes |
Result decodeRow(int rowNumber, BitArray row, int[] extensionStartRange) throws NotFoundException { StringBuilder result = decodeRowStringBuffer; result.setLength(0); int end = decodeMiddle(row, extensionStartRange, result); String resultString = result.toString(); Map<ResultMetadataType,Object> extensionData = parseExtensionString(resultString); Result extensionResult = new Result(resultString, null, new ResultPoint[] { new ResultPoint((extensionStartRange[0] + extensionStartRange[1]) / 2.0f, (float) rowNumber), new ResultPoint((float) end, (float) rowNumber), }, BarcodeFormat.UPC_EAN_EXTENSION); if (extensionData != null) { extensionResult.putAllMetadata(extensionData); } return extensionResult; }
Example 11
Source File: UPCEANExtension5Support.java From ZXing-Orient with Apache License 2.0 | 6 votes |
Result decodeRow(int rowNumber, BitArray row, int[] extensionStartRange) throws NotFoundException { StringBuilder result = decodeRowStringBuffer; result.setLength(0); int end = decodeMiddle(row, extensionStartRange, result); String resultString = result.toString(); Map<ResultMetadataType,Object> extensionData = parseExtensionString(resultString); Result extensionResult = new Result(resultString, null, new ResultPoint[] { new ResultPoint((extensionStartRange[0] + extensionStartRange[1]) / 2.0f, (float) rowNumber), new ResultPoint((float) end, (float) rowNumber), }, BarcodeFormat.UPC_EAN_EXTENSION); if (extensionData != null) { extensionResult.putAllMetadata(extensionData); } return extensionResult; }
Example 12
Source File: UPCEANExtension2Support.java From QrCodeScanner with GNU General Public License v3.0 | 6 votes |
Result decodeRow(int rowNumber, BitArray row, int[] extensionStartRange) throws NotFoundException { StringBuilder result = decodeRowStringBuffer; result.setLength(0); int end = decodeMiddle(row, extensionStartRange, result); String resultString = result.toString(); Map<ResultMetadataType,Object> extensionData = parseExtensionString(resultString); Result extensionResult = new Result(resultString, null, new ResultPoint[] { new ResultPoint((extensionStartRange[0] + extensionStartRange[1]) / 2.0f, rowNumber), new ResultPoint(end, rowNumber), }, BarcodeFormat.UPC_EAN_EXTENSION); if (extensionData != null) { extensionResult.putAllMetadata(extensionData); } return extensionResult; }
Example 13
Source File: UPCEANExtension5Support.java From QrCodeScanner with GNU General Public License v3.0 | 6 votes |
Result decodeRow(int rowNumber, BitArray row, int[] extensionStartRange) throws NotFoundException { StringBuilder result = decodeRowStringBuffer; result.setLength(0); int end = decodeMiddle(row, extensionStartRange, result); String resultString = result.toString(); Map<ResultMetadataType,Object> extensionData = parseExtensionString(resultString); Result extensionResult = new Result(resultString, null, new ResultPoint[] { new ResultPoint((extensionStartRange[0] + extensionStartRange[1]) / 2.0f, rowNumber), new ResultPoint(end, rowNumber), }, BarcodeFormat.UPC_EAN_EXTENSION); if (extensionData != null) { extensionResult.putAllMetadata(extensionData); } return extensionResult; }
Example 14
Source File: UPCEANExtension5Support.java From RipplePower with Apache License 2.0 | 6 votes |
Result decodeRow(int rowNumber, BitArray row, int[] extensionStartRange) throws NotFoundException { StringBuilder result = decodeRowStringBuffer; result.setLength(0); int end = decodeMiddle(row, extensionStartRange, result); String resultString = result.toString(); Map<ResultMetadataType, Object> extensionData = parseExtensionString(resultString); Result extensionResult = new Result(resultString, null, new ResultPoint[] { new ResultPoint((extensionStartRange[0] + extensionStartRange[1]) / 2.0f, (float) rowNumber), new ResultPoint((float) end, (float) rowNumber), }, BarcodeFormat.UPC_EAN_EXTENSION); if (extensionData != null) { extensionResult.putAllMetadata(extensionData); } return extensionResult; }
Example 15
Source File: UPCEANExtension5Support.java From Tesseract-OCR-Scanner with Apache License 2.0 | 6 votes |
Result decodeRow(int rowNumber, BitArray row, int[] extensionStartRange) throws NotFoundException { StringBuilder result = decodeRowStringBuffer; result.setLength(0); int end = decodeMiddle(row, extensionStartRange, result); String resultString = result.toString(); Map<ResultMetadataType,Object> extensionData = parseExtensionString(resultString); Result extensionResult = new Result(resultString, null, new ResultPoint[] { new ResultPoint((extensionStartRange[0] + extensionStartRange[1]) / 2.0f, rowNumber), new ResultPoint(end, rowNumber), }, BarcodeFormat.UPC_EAN_EXTENSION); if (extensionData != null) { extensionResult.putAllMetadata(extensionData); } return extensionResult; }
Example 16
Source File: UPCEANExtension2Support.java From ScreenCapture with MIT License | 6 votes |
Result decodeRow(int rowNumber, BitArray row, int[] extensionStartRange) throws NotFoundException { StringBuilder result = decodeRowStringBuffer; result.setLength(0); int end = decodeMiddle(row, extensionStartRange, result); String resultString = result.toString(); Map<ResultMetadataType,Object> extensionData = parseExtensionString(resultString); Result extensionResult = new Result(resultString, null, new ResultPoint[] { new ResultPoint((extensionStartRange[0] + extensionStartRange[1]) / 2.0f, rowNumber), new ResultPoint(end, rowNumber), }, BarcodeFormat.UPC_EAN_EXTENSION); if (extensionData != null) { extensionResult.putAllMetadata(extensionData); } return extensionResult; }
Example 17
Source File: UPCEANExtension5Support.java From ScreenCapture with MIT License | 6 votes |
Result decodeRow(int rowNumber, BitArray row, int[] extensionStartRange) throws NotFoundException { StringBuilder result = decodeRowStringBuffer; result.setLength(0); int end = decodeMiddle(row, extensionStartRange, result); String resultString = result.toString(); Map<ResultMetadataType,Object> extensionData = parseExtensionString(resultString); Result extensionResult = new Result(resultString, null, new ResultPoint[] { new ResultPoint((extensionStartRange[0] + extensionStartRange[1]) / 2.0f, rowNumber), new ResultPoint(end, rowNumber), }, BarcodeFormat.UPC_EAN_EXTENSION); if (extensionData != null) { extensionResult.putAllMetadata(extensionData); } return extensionResult; }
Example 18
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 19
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 20
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; } }