├── .babelrc ├── .editorconfig ├── .gitignore ├── .travis.yml ├── .vscode ├── launch.json ├── settings.json └── tasks.json ├── LICENSE ├── docs ├── examples │ ├── qr-camera │ │ └── index.html │ ├── qr-image │ │ └── index.html │ ├── qr-svg-writer │ │ └── index.html │ ├── qr-video │ │ ├── index.html │ │ ├── qrcode-video.mp4 │ │ └── source.md │ ├── zxing.qrcodereader.min.js │ └── zxing.qrcodewriter.min.js └── index.html ├── package.json ├── readme.md ├── src ├── browser │ ├── BrowserCodeReader.ts │ ├── BrowserQRCodeReader.ts │ ├── BrowserQRCodeSvgWriter.ts │ ├── HTMLCanvasElementLuminanceSource.ts │ └── VideoInputDevice.ts ├── core │ ├── BarcodeFormat.ts │ ├── Binarizer.ts │ ├── BinaryBitmap.ts │ ├── DecodeHintType.ts │ ├── Dimension.ts │ ├── EncodeHintType.ts │ ├── Exception.ts │ ├── InvertedLuminanceSource.ts │ ├── LuminanceSource.ts │ ├── MultiFormatReader.ts │ ├── MultiFormatWriter.ts │ ├── PlanarYUVLuminanceSource.ts │ ├── RGBLuminanceSource.ts │ ├── Reader.ts │ ├── Result.ts │ ├── ResultMetadataType.ts │ ├── ResultPoint.ts │ ├── ResultPointCallback.ts │ ├── Writer.ts │ ├── common │ │ ├── BitArray.ts │ │ ├── BitMatrix.ts │ │ ├── BitSource.ts │ │ ├── CharacterSetECI.ts │ │ ├── DecoderResult.ts │ │ ├── DefaultGridSampler.ts │ │ ├── DetectorResult.ts │ │ ├── GlobalHistogramBinarizer.ts │ │ ├── GridSampler.ts │ │ ├── GridSamplerInstance.ts │ │ ├── HybridBinarizer.ts │ │ ├── PerspectiveTransform.ts │ │ ├── StringUtils.ts │ │ ├── detector │ │ │ ├── MathUtils.ts │ │ │ ├── MonochromeRectangleDetector.ts │ │ │ └── WhiteRectangleDetector.ts │ │ └── reedsolomon │ │ │ ├── GenericGF.ts │ │ │ ├── GenericGFPoly.ts │ │ │ ├── ReedSolomonDecoder.ts │ │ │ └── ReedSolomonEncoder.ts │ ├── qrcode │ │ ├── QRCodeReader.ts │ │ ├── QRCodeWriter.ts │ │ ├── decoder │ │ │ ├── BitMatrixParser.ts │ │ │ ├── DataBlock.ts │ │ │ ├── DataMask.ts │ │ │ ├── DecodedBitStreamParser.ts │ │ │ ├── Decoder.ts │ │ │ ├── ECB.ts │ │ │ ├── ECBlocks.ts │ │ │ ├── ErrorCorrectionLevel.ts │ │ │ ├── FormatInformation.ts │ │ │ ├── Mode.ts │ │ │ ├── QRCodeDecoderMetaData.ts │ │ │ └── Version.ts │ │ ├── detector │ │ │ ├── AlignmentPattern.ts │ │ │ ├── AlignmentPatternFinder.ts │ │ │ ├── Detector.ts │ │ │ ├── FinderPattern.ts │ │ │ ├── FinderPatternFinder.ts │ │ │ └── FinderPatternInfo.ts │ │ └── encoder │ │ │ ├── BlockPair.ts │ │ │ ├── ByteMatrix.ts │ │ │ ├── Encoder.ts │ │ │ ├── MaskUtil.ts │ │ │ ├── MatrixUtil.ts │ │ │ └── QRCode.ts │ └── util │ │ ├── Arrays.ts │ │ ├── Float.ts │ │ ├── Integer.ts │ │ ├── StringBuilder.ts │ │ ├── StringEncoding.ts │ │ └── System.ts └── test │ └── core │ ├── PlanarYUVLuminanceSourceTestCase.ts │ ├── RGBLuminanceSourceTestCase.ts │ ├── SharpImageLuminanceSource.ts │ ├── common │ ├── AbstractBlackBoxTestCase.ts │ ├── BitArrayTestCase.ts │ ├── BitMatrixTestCase.ts │ ├── BitSourceBuilder.ts │ ├── BitSourceTestCase.ts │ ├── PerspectiveTransformTestCase.ts │ ├── StringUtilsTestCase.ts │ ├── TestResult.ts │ ├── detector │ │ └── MathUtilsTestCase.ts │ └── reedsolomon │ │ └── ReedSolomonTestCase.ts │ ├── qrcode │ ├── HybridBinarizerTestCase.ts │ ├── QRCodeBlackBox1TestCase.ts │ ├── QRCodeBlackBox2TestCase.ts │ ├── QRCodeBlackBox3TestCase.ts │ ├── QRCodeBlackBox4TestCase.ts │ ├── QRCodeBlackBox5TestCase.ts │ ├── QRCodeBlackBox6TestCase.ts │ ├── QRCodeBlackBox7TestCase.ts │ ├── QRCodeWriterTestCase.ts │ ├── decoder │ │ ├── DataMaskTestCase.ts │ │ ├── DecodedBitStreamParserTestCase.ts │ │ ├── ErrorCorrectionLevelTestCase.ts │ │ ├── FormatInformationTestCase.ts │ │ ├── ModeTestCase.ts │ │ └── VersionTestCase.ts │ └── encoder │ │ ├── BitVectorTestCase.ts │ │ ├── EncoderTestCase.ts │ │ ├── MaskUtilTestCase.ts │ │ ├── MatrixUtilTestCase.ts │ │ └── QRCodeTestCase.ts │ ├── resources │ ├── blackbox │ │ ├── common │ │ │ └── simple.png │ │ ├── qrcode-1 │ │ │ ├── 1.png │ │ │ ├── 1.txt │ │ │ ├── 10.png │ │ │ ├── 10.txt │ │ │ ├── 11.png │ │ │ ├── 11.txt │ │ │ ├── 12.png │ │ │ ├── 12.txt │ │ │ ├── 13.png │ │ │ ├── 13.txt │ │ │ ├── 14.png │ │ │ ├── 14.txt │ │ │ ├── 15.png │ │ │ ├── 15.txt │ │ │ ├── 16.png │ │ │ ├── 16.txt │ │ │ ├── 17.png │ │ │ ├── 17.txt │ │ │ ├── 18.png │ │ │ ├── 18.txt │ │ │ ├── 19.png │ │ │ ├── 19.txt │ │ │ ├── 1_b.png1 │ │ │ ├── 2.png │ │ │ ├── 2.txt │ │ │ ├── 20.png │ │ │ ├── 20.txt │ │ │ ├── 3.png │ │ │ ├── 3.txt │ │ │ ├── 4.png │ │ │ ├── 4.txt │ │ │ ├── 5.png │ │ │ ├── 5.txt │ │ │ ├── 6.png │ │ │ ├── 6.txt │ │ │ ├── 7.png │ │ │ ├── 7.txt │ │ │ ├── 8.png │ │ │ ├── 8.txt │ │ │ ├── 9.png │ │ │ └── 9.txt │ │ ├── qrcode-2 │ │ │ ├── 1.png │ │ │ ├── 1.txt │ │ │ ├── 10.png │ │ │ ├── 10.txt │ │ │ ├── 11.png │ │ │ ├── 11.txt │ │ │ ├── 12.png │ │ │ ├── 12.txt │ │ │ ├── 13.png │ │ │ ├── 13.txt │ │ │ ├── 14.png │ │ │ ├── 14.txt │ │ │ ├── 15.png │ │ │ ├── 15.txt │ │ │ ├── 16.png │ │ │ ├── 16.txt │ │ │ ├── 17.png │ │ │ ├── 17.txt │ │ │ ├── 18.png │ │ │ ├── 18.txt │ │ │ ├── 19.png │ │ │ ├── 19.txt │ │ │ ├── 2.png │ │ │ ├── 2.txt │ │ │ ├── 20.png │ │ │ ├── 20.txt │ │ │ ├── 21.png │ │ │ ├── 21.txt │ │ │ ├── 22.png │ │ │ ├── 22.txt │ │ │ ├── 23.png │ │ │ ├── 23.txt │ │ │ ├── 24.png │ │ │ ├── 24.txt │ │ │ ├── 25.png │ │ │ ├── 25.txt │ │ │ ├── 26.png │ │ │ ├── 26.txt │ │ │ ├── 27.png │ │ │ ├── 27.txt │ │ │ ├── 28.png │ │ │ ├── 28.txt │ │ │ ├── 29.png │ │ │ ├── 29.txt │ │ │ ├── 30.png │ │ │ ├── 30.txt │ │ │ ├── 31.png │ │ │ ├── 31.txt │ │ │ ├── 32.png │ │ │ ├── 32.txt │ │ │ ├── 33.png │ │ │ ├── 33.txt │ │ │ ├── 34.png │ │ │ ├── 34.txt │ │ │ ├── 35.png │ │ │ ├── 35.txt │ │ │ ├── 4.png │ │ │ ├── 4.txt │ │ │ ├── 5.png │ │ │ ├── 5.txt │ │ │ ├── 6.png │ │ │ ├── 6.txt │ │ │ ├── 7.png │ │ │ ├── 7.txt │ │ │ ├── 8.png │ │ │ ├── 8.txt │ │ │ ├── 9.png │ │ │ └── 9.txt │ │ ├── qrcode-3 │ │ │ ├── 01.png │ │ │ ├── 01.txt │ │ │ ├── 02.png │ │ │ ├── 02.txt │ │ │ ├── 03.png │ │ │ ├── 03.txt │ │ │ ├── 04.png │ │ │ ├── 04.txt │ │ │ ├── 05.png │ │ │ ├── 05.txt │ │ │ ├── 06.png │ │ │ ├── 06.txt │ │ │ ├── 07.png │ │ │ ├── 07.txt │ │ │ ├── 08.png │ │ │ ├── 08.txt │ │ │ ├── 09.png │ │ │ ├── 09.txt │ │ │ ├── 10.png │ │ │ ├── 10.txt │ │ │ ├── 11.png │ │ │ ├── 11.txt │ │ │ ├── 12.png │ │ │ ├── 12.txt │ │ │ ├── 13.png │ │ │ ├── 13.txt │ │ │ ├── 14.png │ │ │ ├── 14.txt │ │ │ ├── 15.png │ │ │ ├── 15.txt │ │ │ ├── 16.png │ │ │ ├── 16.txt │ │ │ ├── 17.png │ │ │ ├── 17.txt │ │ │ ├── 18.png │ │ │ ├── 18.txt │ │ │ ├── 19.png │ │ │ ├── 19.txt │ │ │ ├── 20.png │ │ │ ├── 20.txt │ │ │ ├── 21.png │ │ │ ├── 21.txt │ │ │ ├── 22.png │ │ │ ├── 22.txt │ │ │ ├── 23.png │ │ │ ├── 23.txt │ │ │ ├── 24.png │ │ │ ├── 24.txt │ │ │ ├── 25.png │ │ │ ├── 25.txt │ │ │ ├── 26.png │ │ │ ├── 26.txt │ │ │ ├── 27.png │ │ │ ├── 27.txt │ │ │ ├── 28.png │ │ │ ├── 28.txt │ │ │ ├── 29.png │ │ │ ├── 29.txt │ │ │ ├── 30.png │ │ │ ├── 30.txt │ │ │ ├── 31.png │ │ │ ├── 31.txt │ │ │ ├── 32.png │ │ │ ├── 32.txt │ │ │ ├── 33.png │ │ │ ├── 33.txt │ │ │ ├── 34.png │ │ │ ├── 34.txt │ │ │ ├── 35.png │ │ │ ├── 35.txt │ │ │ ├── 36.png │ │ │ ├── 36.txt │ │ │ ├── 37.png │ │ │ ├── 37.txt │ │ │ ├── 38.png │ │ │ ├── 38.txt │ │ │ ├── 39.png │ │ │ ├── 39.txt │ │ │ ├── 40.png │ │ │ ├── 40.txt │ │ │ ├── 41.png │ │ │ ├── 41.txt │ │ │ ├── 42.png │ │ │ └── 42.txt │ │ ├── qrcode-4 │ │ │ ├── 01.png │ │ │ ├── 01.txt │ │ │ ├── 02.png │ │ │ ├── 02.txt │ │ │ ├── 03.png │ │ │ ├── 03.txt │ │ │ ├── 04.png │ │ │ ├── 04.txt │ │ │ ├── 05.png │ │ │ ├── 05.txt │ │ │ ├── 06.png │ │ │ ├── 06.txt │ │ │ ├── 07.png │ │ │ ├── 07.txt │ │ │ ├── 08.png │ │ │ ├── 08.txt │ │ │ ├── 09.png │ │ │ ├── 09.txt │ │ │ ├── 10.png │ │ │ ├── 10.txt │ │ │ ├── 11.png │ │ │ ├── 11.txt │ │ │ ├── 12.png │ │ │ ├── 12.txt │ │ │ ├── 13.png │ │ │ ├── 13.txt │ │ │ ├── 14.png │ │ │ ├── 14.txt │ │ │ ├── 15.png │ │ │ ├── 15.txt │ │ │ ├── 16.png │ │ │ ├── 16.txt │ │ │ ├── 17.png │ │ │ ├── 17.txt │ │ │ ├── 18.png │ │ │ ├── 18.txt │ │ │ ├── 19.png │ │ │ ├── 19.txt │ │ │ ├── 20.png │ │ │ ├── 20.txt │ │ │ ├── 21.png │ │ │ ├── 21.txt │ │ │ ├── 22.png │ │ │ ├── 22.txt │ │ │ ├── 23.png │ │ │ ├── 23.txt │ │ │ ├── 24.png │ │ │ ├── 24.txt │ │ │ ├── 25.png │ │ │ ├── 25.txt │ │ │ ├── 26.png │ │ │ ├── 26.txt │ │ │ ├── 27.png │ │ │ ├── 27.txt │ │ │ ├── 28.png │ │ │ ├── 28.txt │ │ │ ├── 29.png │ │ │ ├── 29.txt │ │ │ ├── 30.png │ │ │ ├── 30.txt │ │ │ ├── 31.png │ │ │ ├── 31.txt │ │ │ ├── 32.png │ │ │ ├── 32.txt │ │ │ ├── 33.png │ │ │ ├── 33.txt │ │ │ ├── 34.png │ │ │ ├── 34.txt │ │ │ ├── 35.png │ │ │ ├── 35.txt │ │ │ ├── 36.png │ │ │ ├── 36.txt │ │ │ ├── 37.png │ │ │ ├── 37.txt │ │ │ ├── 38.png │ │ │ ├── 38.txt │ │ │ ├── 39.png │ │ │ ├── 39.txt │ │ │ ├── 40.png │ │ │ ├── 40.txt │ │ │ ├── 41.png │ │ │ ├── 41.txt │ │ │ ├── 42.png │ │ │ ├── 42.txt │ │ │ ├── 43.png │ │ │ ├── 43.txt │ │ │ ├── 44.png │ │ │ ├── 44.txt │ │ │ ├── 45.png │ │ │ ├── 45.txt │ │ │ ├── 46.png │ │ │ ├── 46.txt │ │ │ ├── 47.png │ │ │ ├── 47.txt │ │ │ ├── 48.png │ │ │ └── 48.txt │ │ ├── qrcode-5 │ │ │ ├── 01.png │ │ │ ├── 01.txt │ │ │ ├── 02.png │ │ │ ├── 02.txt │ │ │ ├── 03.png │ │ │ ├── 03.txt │ │ │ ├── 04.png │ │ │ ├── 04.txt │ │ │ ├── 05.png │ │ │ ├── 05.txt │ │ │ ├── 06.png │ │ │ ├── 06.txt │ │ │ ├── 07.png │ │ │ ├── 07.txt │ │ │ ├── 08.png │ │ │ ├── 08.txt │ │ │ ├── 09.png │ │ │ ├── 09.txt │ │ │ ├── 10.png │ │ │ ├── 10.txt │ │ │ ├── 11.png │ │ │ ├── 11.txt │ │ │ ├── 12.png │ │ │ ├── 12.txt │ │ │ ├── 13.png │ │ │ ├── 13.txt │ │ │ ├── 14.png │ │ │ ├── 14.txt │ │ │ ├── 15.png │ │ │ ├── 15.txt │ │ │ ├── 16.png │ │ │ ├── 16.txt │ │ │ ├── 17.png │ │ │ ├── 17.txt │ │ │ ├── 18.png │ │ │ ├── 18.txt │ │ │ ├── 19.png │ │ │ └── 19.txt │ │ ├── qrcode-6 │ │ │ ├── 1.png │ │ │ ├── 1.txt │ │ │ ├── 10.png │ │ │ ├── 10.txt │ │ │ ├── 11.png │ │ │ ├── 11.txt │ │ │ ├── 12.png │ │ │ ├── 12.txt │ │ │ ├── 13.png │ │ │ ├── 13.txt │ │ │ ├── 14.png │ │ │ ├── 14.txt │ │ │ ├── 15.png │ │ │ ├── 15.txt │ │ │ ├── 2.png │ │ │ ├── 2.txt │ │ │ ├── 3.png │ │ │ ├── 3.txt │ │ │ ├── 4.png │ │ │ ├── 4.txt │ │ │ ├── 5.png │ │ │ ├── 5.txt │ │ │ ├── 6.png │ │ │ ├── 6.txt │ │ │ ├── 7.png │ │ │ ├── 7.txt │ │ │ ├── 8.png │ │ │ ├── 8.txt │ │ │ ├── 9.png │ │ │ └── 9.txt │ │ └── qrcode-7 │ │ │ ├── 1.png │ │ │ ├── 1.txt │ │ │ ├── 2.png │ │ │ ├── 2.txt │ │ │ ├── 3.png │ │ │ ├── 3.txt │ │ │ ├── 4.png │ │ │ └── 4.txt │ └── golden │ │ └── qrcode │ │ └── renderer-test-01.png │ └── util │ ├── AssertUtils.ts │ ├── Random.ts │ └── SharpImage.ts ├── tsconfig-dist.json ├── tsconfig.json ├── tslint.json ├── typescriptport.md └── webpack.config.js /.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": ["es2015"], 3 | "plugins": ["babel-plugin-add-module-exports"] 4 | } -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | # editorconfig.org 2 | root = true 3 | 4 | [*] 5 | indent_style = space 6 | indent_size = 2 7 | end_of_line = lf 8 | charset = utf-8 9 | trim_trailing_whitespace = true 10 | insert_final_newline = true 11 | 12 | [*.md] 13 | trim_trailing_whitespace = false 14 | 15 | [{package,bower}.json] 16 | indent_style = space 17 | indent_size = 2 18 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .awcache 2 | staging/ 3 | autotransform/input/* 4 | autotransform/output/* 5 | node_modules/ 6 | build-browser/* 7 | build-node/* 8 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: stable 3 | before_install: 4 | - sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test 5 | - sudo apt-get -qq update 6 | - sudo apt-get -qq install g++-4.8 7 | env: 8 | - CXX=g++-4.8 -------------------------------------------------------------------------------- /.vscode/launch.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "0.2.0", 3 | "configurations": [ 4 | 5 | { 6 | "name": "Unit tests", 7 | "type": "node", 8 | "request": "launch", 9 | "preLaunchTask": "build.node", 10 | "program": "${workspaceRoot}/node_modules/mocha/bin/_mocha", 11 | "args": [ 12 | "--colors", 13 | "--timeout", "999999", 14 | "./build-node/test/**/*.js", 15 | "-g", "testHybridBinarizer" 16 | ], 17 | "protocol": "inspector", 18 | "cwd": "${workspaceRoot}", 19 | "stopOnEntry": false, 20 | "runtimeExecutable": null, 21 | "sourceMaps": true, 22 | "outFiles": ["${workspaceRoot}/build-node/**/*.js"], 23 | "runtimeArgs": [ 24 | "--nolazy" 25 | ], 26 | "env": { 27 | "NODE_ENV": "test" 28 | } 29 | } 30 | ] 31 | 32 | } 33 | -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | // Place your settings in this file to overwrite default and user settings. 2 | { 3 | "tslint.enable": true, 4 | "autoimport.doubleQuotes": false, 5 | "autoimport.spaceBetweenBraces": true 6 | } 7 | -------------------------------------------------------------------------------- /.vscode/tasks.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "0.1.0", 3 | "command": "tsc", 4 | "showOutput": "always", 5 | "echoCommand": true, 6 | "isShellCommand": true, 7 | "suppressTaskName": true, 8 | "tasks": [ 9 | { 10 | "taskName": "build.node", 11 | "args": [ 12 | 13 | ], 14 | "isBuildCommand": true, 15 | "problemMatcher": "$tsc" 16 | } 17 | ] 18 | } -------------------------------------------------------------------------------- /docs/examples/qr-image/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | ZXing | Scan QR Code from Image 9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 |
18 |

Scan QR Code from Image

19 | 20 |

This example shows how to scan a QR code with ZXing javascript library from an image. The example decodes from the src in img tag, however is also possible to decode directly from an url without an img tag.

21 | 22 |
23 | Decode 24 |
25 | 26 |
27 | 28 |
29 | 30 | 31 |
32 |

33 |
34 | 35 |

See the source code for this example.

36 | 37 |
38 | 39 | 44 | 45 |
46 | 47 | 48 | 67 | 68 | 69 | -------------------------------------------------------------------------------- /docs/examples/qr-svg-writer/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | ZXing | Write QR Code to SVG 9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 |
18 |

Write QR Code to SVG

19 | 20 |

This example shows how to write a QR code to SVG with ZXing javascript library. 21 | 22 |

23 | 24 |
25 |
26 | 27 |
28 | 29 |
30 | Write 31 | Save File 32 |
33 | 34 | 35 |
36 | 37 |

See the source code for this example.

38 | 39 |
40 | 41 | 46 | 47 |
48 | 49 | 50 | 51 | 72 | 73 | 74 | -------------------------------------------------------------------------------- /docs/examples/qr-video/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | ZXing | Demo 9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 |
18 |

Scan QR Code from Video File

19 | 20 |

This example shows how to scan a QR code with ZXing javascript library from a video file. The example decodes from an url and shows the video while decoding, however is also possbile to decode without showing the video.

21 | 22 |
23 | Start 24 | Reset 25 |
26 | 27 |
28 | 29 |
30 | 31 | 32 |
33 |

34 |
35 | 36 |

See the source code for this example.

37 | 38 |
39 | 40 | 45 | 46 |
47 | 48 | 49 | 73 | 74 | 75 | -------------------------------------------------------------------------------- /docs/examples/qr-video/qrcode-video.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aleris/zxing-typescript/ffd55027784de89822bc31e989815ea69258c780/docs/examples/qr-video/qrcode-video.mp4 -------------------------------------------------------------------------------- /docs/examples/qr-video/source.md: -------------------------------------------------------------------------------- 1 | qrcode-video from cirocosta.github.io/qcode-decoder/ -------------------------------------------------------------------------------- /docs/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | ZXing TypeScript | Demo & Examples 9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 |
18 |

ZXing TypeScript Examples

19 | 20 |

ZXing ("zebra crossing") TypeScript is an open-source, multi-format 1D/2D barcode image processing library ported to TypeScript from Java.

21 | 22 |

The library can be used from browser or from node. Below are links to browser demo & examples.

23 | 24 |

25 | More information can be found in GitHub project home page. 26 |

27 | 28 |

QR Code Scanning Examples

29 | 35 | 36 |

37 | View source code on GitHub. 38 |

39 | 40 |
41 | 42 | 47 | 48 |
49 | 50 | 51 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "zxing-typescript", 3 | "version": "0.1.3", 4 | "description": "TypeScript port of ZXing open-source, multi-format 1D/2D barcode image processing library", 5 | "keywords": [ 6 | "zxing-typescript", 7 | "zxing", 8 | "barcode-scanner", 9 | "barcode-reader", 10 | "barcode-generator", 11 | "qr-code" 12 | ], 13 | "main": "build-node/core/MultiFormatReader.js", 14 | "scripts": { 15 | "build.node": "tsc", 16 | "build.browser.dist": "webpack -p --env dist", 17 | "build.browser.dev": "webpack --env dev --display-error-details", 18 | "lint": "tslint -c tslint.json 'src/**/*.ts'", 19 | "pretest-2": "npm run lint && npm run build.node", 20 | "pretest": "npm run build.node", 21 | "test": "mocha --compilers js:babel-core/register \"build-node/test/core/**/*.js\" --timeout 30000 --colors", 22 | "docs": "npm run build.browser.dist && copyfiles -u 1 build-browser/*.min.js docs/examples/", 23 | "start": "npm run docs && http-server docs", 24 | "autotransform": "node ./autotransform/transform.js" 25 | }, 26 | "author": "Adrian Toșcă", 27 | "license": "Apache-2.0", 28 | "bugs": "https://github.com/aleris/zxing-typescript/issues", 29 | "repository": { 30 | "type": "git", 31 | "url": "https://github.com/aleris/zxing-typescript" 32 | }, 33 | "dependencies": { 34 | "@types/big.js": "0.0.31", 35 | "@types/text-encoding": "0.0.30", 36 | "big.js": "^3.1.3", 37 | "text-encoding": "^0.6.4", 38 | "typescript": "^2.4.2" 39 | }, 40 | "devDependencies": { 41 | "@types/async": "^2.0.40", 42 | "@types/chai": "^4.0.0", 43 | "@types/jimp": "^0.2.1", 44 | "@types/mocha": "^2.2.41", 45 | "@types/node": "^7.0.18", 46 | "@types/seedrandom": "^2.4.27", 47 | "@types/sharp": "^0.17.1", 48 | "async": "^2.4.0", 49 | "awesome-typescript-loader": "^3.1.3", 50 | "babel-core": "^6.24.1", 51 | "babel-loader": "^7.0.0", 52 | "babel-plugin-add-module-exports": "^0.2.1", 53 | "babel-preset-es2015": "^6.24.1", 54 | "copyfiles": "^1.2.0", 55 | "mocha": "^3.3.0", 56 | "seedrandom": "^2.4.3", 57 | "sharp": "^0.17.3", 58 | "source-map-loader": "^0.2.1", 59 | "ts-loader": "^2.1.0", 60 | "tslint": "^5.5.0", 61 | "typescript": "^2.3.2", 62 | "uglifyjs-webpack-plugin": "^0.4.3", 63 | "webpack": "^2.6.1" 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /src/browser/BrowserQRCodeReader.ts: -------------------------------------------------------------------------------- 1 | import QRCodeReader from './../core/qrcode/QRCodeReader' 2 | import VideoInputDevice from './VideoInputDevice' 3 | import BrowserCodeReader from './BrowserCodeReader' 4 | 5 | /** 6 | * QR Code reader to use from browser. 7 | * 8 | * @class BrowserQRCodeReader 9 | * @extends {BrowserCodeReader} 10 | */ 11 | class BrowserQRCodeReader extends BrowserCodeReader { 12 | /** 13 | * Creates an instance of BrowserQRCodeReader. 14 | * @param {number} [timeBetweenScansMillis=500] the time delay between subsequent decode tries 15 | * 16 | * @memberOf BrowserQRCodeReader 17 | */ 18 | public constructor(timeBetweenScansMillis: number = 500) { 19 | super(new QRCodeReader(), timeBetweenScansMillis) 20 | } 21 | } 22 | 23 | export { VideoInputDevice, BrowserQRCodeReader } -------------------------------------------------------------------------------- /src/browser/VideoInputDevice.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Video input device metadata containing the id and label of the device if available. 3 | * 4 | * @export 5 | * @class VideoInputDevice 6 | */ 7 | 8 | export default class VideoInputDevice { 9 | /** 10 | * Creates an instance of VideoInputDevice. 11 | * @param {string} deviceId the video input device id 12 | * @param {string} label the label of the device if available 13 | * 14 | * @memberOf VideoInputDevice 15 | */ 16 | public constructor(public deviceId: string, public label: string) {} 17 | } 18 | -------------------------------------------------------------------------------- /src/core/BarcodeFormat.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Direct port to TypeScript of ZXing by Adrian Toșcă 3 | */ 4 | 5 | /* 6 | * Copyright 2009 ZXing authors 7 | * 8 | * Licensed under the Apache License, Version 2.0 (the "License"); 9 | * you may not use this file except in compliance with the License. 10 | * You may obtain a copy of the License at 11 | * 12 | * http://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, software 15 | * distributed under the License is distributed on an "AS IS" BASIS, 16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | * See the License for the specific language governing permissions and 18 | * limitations under the License. 19 | */ 20 | 21 | /*namespace com.google.zxing {*/ 22 | 23 | /** 24 | * Enumerates barcode formats known to this package. Please keep alphabetized. 25 | * 26 | * @author Sean Owen 27 | */ 28 | const enum BarcodeFormat { 29 | /** Aztec 2D barcode format. */ 30 | AZTEC, 31 | 32 | /** CODABAR 1D format. */ 33 | CODABAR, 34 | 35 | /** Code 39 1D format. */ 36 | CODE_39, 37 | 38 | /** Code 93 1D format. */ 39 | CODE_93, 40 | 41 | /** Code 128 1D format. */ 42 | CODE_128, 43 | 44 | /** Data Matrix 2D barcode format. */ 45 | DATA_MATRIX, 46 | 47 | /** EAN-8 1D format. */ 48 | EAN_8, 49 | 50 | /** EAN-13 1D format. */ 51 | EAN_13, 52 | 53 | /** ITF (Interleaved Two of Five) 1D format. */ 54 | ITF, 55 | 56 | /** MaxiCode 2D barcode format. */ 57 | MAXICODE, 58 | 59 | /** PDF417 format. */ 60 | PDF_417, 61 | 62 | /** QR Code 2D barcode format. */ 63 | QR_CODE, 64 | 65 | /** RSS 14 */ 66 | RSS_14, 67 | 68 | /** RSS EXPANDED */ 69 | RSS_EXPANDED, 70 | 71 | /** UPC-A 1D format. */ 72 | UPC_A, 73 | 74 | /** UPC-E 1D format. */ 75 | UPC_E, 76 | 77 | /** UPC/EAN extension format. Not a stand-alone format. */ 78 | UPC_EAN_EXTENSION 79 | 80 | } 81 | 82 | export default BarcodeFormat -------------------------------------------------------------------------------- /src/core/Dimension.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009 ZXing authors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | import Exception from './Exception' 18 | 19 | /*namespace com.google.zxing {*/ 20 | 21 | /** 22 | * Simply encapsulates a width and height. 23 | */ 24 | export default class Dimension { 25 | public constructor(private width: number /*int*/, private height: number /*int*/) { 26 | if (width < 0 || height < 0) { 27 | throw new Exception(Exception.IllegalArgumentException) 28 | } 29 | } 30 | 31 | public getWidth(): number /*int*/ { 32 | return this.width 33 | } 34 | 35 | public getHeight(): number /*int*/ { 36 | return this.height 37 | } 38 | 39 | /*@Override*/ 40 | public equals(other: any): boolean { 41 | if (other instanceof Dimension) { 42 | const d = other 43 | return this.width == d.width && this.height == d.height 44 | } 45 | return false 46 | } 47 | 48 | /*@Override*/ 49 | public hashCode(): number /*int*/ { 50 | return this.width * 32713 + this.height; 51 | } 52 | 53 | /*@Override*/ 54 | public toString(): string { 55 | return this.width + "x" + this.height 56 | } 57 | 58 | } 59 | -------------------------------------------------------------------------------- /src/core/Exception.ts: -------------------------------------------------------------------------------- 1 | export default class Exception { 2 | 3 | public static IllegalArgumentException = "IllegalArgumentException" 4 | public static NotFoundException = "NotFoundException" 5 | public static ArithmeticException = "ArithmeticException" 6 | public static FormatException = "FormatException" 7 | public static ChecksumException = "ChecksumException" 8 | public static WriterException = "WriterException" 9 | public static IllegalStateException = "IllegalStateException" 10 | public static UnsupportedOperationException = "UnsupportedOperationException" 11 | public static ReedSolomonException = "ReedSolomonException" 12 | public static ArgumentException = "ArgumentException" 13 | public static ReaderException = "ReaderException" 14 | 15 | public constructor(private type: string, private message?: string) {} 16 | 17 | public getType(): string { 18 | return this.type 19 | } 20 | 21 | public getMessage(): string|undefined { 22 | return this.message 23 | } 24 | 25 | public static isOfType(ex: any, type: string): boolean { 26 | return ex.type === type 27 | } 28 | } -------------------------------------------------------------------------------- /src/core/InvertedLuminanceSource.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009 ZXing authors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | import LuminanceSource from './LuminanceSource' 18 | 19 | /*namespace com.google.zxing {*/ 20 | 21 | /** 22 | * A wrapper implementation of {@link LuminanceSource} which inverts the luminances it returns -- black becomes 23 | * white and vice versa, and each value becomes (255-value). 24 | * 25 | * @author Sean Owen 26 | */ 27 | export default class InvertedLuminanceSource extends LuminanceSource { 28 | 29 | public constructor(private delegate: LuminanceSource) { 30 | super(delegate.getWidth(), delegate.getHeight()) 31 | } 32 | 33 | /*@Override*/ 34 | public getRow(y: number /*int*/, row?: Uint8ClampedArray): Uint8ClampedArray { 35 | const sourceRow = this.delegate.getRow(y, row) 36 | const width: number /*int*/ = this.getWidth() 37 | for (let i = 0; i < width; i++) { 38 | sourceRow[i] = /*(byte)*/ (255 - (sourceRow[i] & 0xFF)) 39 | } 40 | return sourceRow 41 | } 42 | 43 | /*@Override*/ 44 | public getMatrix(): Uint8ClampedArray { 45 | const matrix: Uint8ClampedArray = this.delegate.getMatrix() 46 | const length: number /*int*/ = this.getWidth() * this.getHeight() 47 | const invertedMatrix = new Uint8ClampedArray(length) 48 | for (let i = 0; i < length; i++) { 49 | invertedMatrix[i] = /*(byte)*/ (255 - (matrix[i] & 0xFF)) 50 | } 51 | return invertedMatrix 52 | } 53 | 54 | /*@Override*/ 55 | public isCropSupported(): boolean { 56 | return this.delegate.isCropSupported() 57 | } 58 | 59 | /*@Override*/ 60 | public crop(left: number /*int*/, top: number /*int*/, width: number /*int*/, height: number /*int*/): LuminanceSource { 61 | return new InvertedLuminanceSource(this.delegate.crop(left, top, width, height)) 62 | } 63 | 64 | /*@Override*/ 65 | public isRotateSupported(): boolean { 66 | return this.delegate.isRotateSupported() 67 | } 68 | 69 | /** 70 | * @return original delegate {@link LuminanceSource} since invert undoes itself 71 | */ 72 | /*@Override*/ 73 | public invert(): LuminanceSource { 74 | return this.delegate 75 | } 76 | 77 | /*@Override*/ 78 | public rotateCounterClockwise(): LuminanceSource { 79 | return new InvertedLuminanceSource(this.delegate.rotateCounterClockwise()) 80 | } 81 | 82 | /*@Override*/ 83 | public rotateCounterClockwise45(): LuminanceSource { 84 | return new InvertedLuminanceSource(this.delegate.rotateCounterClockwise45()) 85 | } 86 | 87 | } 88 | -------------------------------------------------------------------------------- /src/core/Reader.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2007 ZXing authors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | /*namespace com.google.zxing {*/ 18 | 19 | /*import java.util.Map;*/ 20 | 21 | import BinaryBitmap from './BinaryBitmap' 22 | import Result from './Result' 23 | import DecodeHintType from './DecodeHintType' 24 | 25 | export default Reader 26 | 27 | /** 28 | * Implementations of this interface can decode an image of a barcode in some format into 29 | * the it: string encodes. For example, {@link com.google.zxing.qrcode.QRCodeReader} can 30 | * decode a QR code. The decoder may optionally receive hints from the caller which may help 31 | * it decode more quickly or accurately. 32 | * 33 | * See {@link MultiFormatReader}, which attempts to determine what barcode 34 | * format is present within the image as well, and then decodes it accordingly. 35 | * 36 | * @author Sean Owen 37 | * @author dswitkin@google.com (Daniel Switkin) 38 | */ 39 | interface Reader { 40 | 41 | /** 42 | * Locates and decodes a barcode in some format within an image. 43 | * 44 | * @param image image of barcode to decode 45 | * @return which: string the barcode encodes 46 | * @throws NotFoundException if no potential barcode is found 47 | * @throws ChecksumException if a potential barcode is found but does not pass its checksum 48 | * @throws FormatException if a potential barcode is found but format is invalid 49 | */ 50 | // decode(image: BinaryBitmap): Result /*throws NotFoundException, ChecksumException, FormatException*/ 51 | 52 | /** 53 | * Locates and decodes a barcode in some format within an image. This method also accepts 54 | * hints, each possibly associated to some data, which may help the implementation decode. 55 | * 56 | * @param image image of barcode to decode 57 | * @param hints passed as a {@link Map} from {@link DecodeHintType} 58 | * to arbitrary data. The 59 | * meaning of the data depends upon the hint type. The implementation may or may not do 60 | * anything with these hints. 61 | * @return which: string the barcode encodes 62 | * @throws NotFoundException if no potential barcode is found 63 | * @throws ChecksumException if a potential barcode is found but does not pass its checksum 64 | * @throws FormatException if a potential barcode is found but format is invalid 65 | */ 66 | decode(image: BinaryBitmap, hints?: Map|null): Result 67 | /*throws NotFoundException, ChecksumException, FormatException*/ 68 | 69 | /** 70 | * Resets any internal state the implementation has after a decode, to prepare it 71 | * for reuse. 72 | */ 73 | reset(): void 74 | 75 | } -------------------------------------------------------------------------------- /src/core/ResultPointCallback.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009 ZXing authors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | /*namespace com.google.zxing {*/ 18 | 19 | import ResultPoint from './ResultPoint' 20 | 21 | export default ResultPointCallback 22 | 23 | /** 24 | * Callback which is invoked when a possible result point (significant 25 | * point in the barcode image such as a corner) is found. 26 | * 27 | * @see DecodeHintType#NEED_RESULT_POINT_CALLBACK 28 | */ 29 | interface ResultPointCallback { 30 | 31 | foundPossibleResultPoint(point: ResultPoint): void 32 | 33 | } 34 | -------------------------------------------------------------------------------- /src/core/Writer.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008 ZXing authors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | /*namespace com.google.zxing {*/ 18 | 19 | import BitMatrix from './common/BitMatrix' 20 | import BarcodeFormat from './BarcodeFormat' 21 | import EncodeHintType from './EncodeHintType' 22 | 23 | export default Writer 24 | 25 | /*import java.util.Map;*/ 26 | 27 | /** 28 | * The base class for all objects which encode/generate a barcode image. 29 | * 30 | * @author dswitkin@google.com (Daniel Switkin) 31 | */ 32 | interface Writer { 33 | 34 | /** 35 | * Encode a barcode using the default settings. 36 | * 37 | * @param contents The contents to encode in the barcode 38 | * @param format The barcode format to generate 39 | * @param width The preferred width in pixels 40 | * @param height The preferred height in pixels 41 | * @return {@link BitMatrix} representing encoded barcode image 42 | * @throws WriterException if contents cannot be encoded legally in a format 43 | */ 44 | // encode(contents: string, format: BarcodeFormat, width: number /*int*/, height: number /*int*/): BitMatrix 45 | /*throws WriterException*/ 46 | 47 | /** 48 | * @param contents The contents to encode in the barcode 49 | * @param format The barcode format to generate 50 | * @param width The preferred width in pixels 51 | * @param height The preferred height in pixels 52 | * @param hints Additional parameters to supply to the encoder 53 | * @return {@link BitMatrix} representing encoded barcode image 54 | * @throws WriterException if contents cannot be encoded legally in a format 55 | */ 56 | encode(contents: string, 57 | format: BarcodeFormat, 58 | width: number /*int*/, 59 | height: number /*int*/, 60 | hints: Map): BitMatrix 61 | /*throws WriterException*/ 62 | 63 | } 64 | -------------------------------------------------------------------------------- /src/core/common/DetectorResult.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2007 ZXing authors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | /*namespace com.google.zxing.common {*/ 18 | 19 | import ResultPoint from './../ResultPoint' 20 | import BitMatrix from './BitMatrix' 21 | 22 | /** 23 | *

Encapsulates the result of detecting a barcode in an image. This includes the raw 24 | * matrix of black/white pixels corresponding to the barcode, and possibly points of interest 25 | * in the image, like the location of finder patterns or corners of the barcode in the image.

26 | * 27 | * @author Sean Owen 28 | */ 29 | export default class DetectorResult { 30 | 31 | private bits: BitMatrix 32 | private points: Array 33 | 34 | public constructor(bits: BitMatrix, points: Array) { 35 | this.bits = bits 36 | this.points = points 37 | } 38 | 39 | public getBits(): BitMatrix { 40 | return this.bits 41 | } 42 | 43 | public getPoints(): Array { 44 | return this.points 45 | } 46 | 47 | } -------------------------------------------------------------------------------- /src/core/common/GridSamplerInstance.ts: -------------------------------------------------------------------------------- 1 | import GridSampler from './GridSampler' 2 | import DefaultGridSampler from './DefaultGridSampler' 3 | 4 | export default class GridSamplerInstance { 5 | 6 | private static gridSampler: GridSampler = new DefaultGridSampler() 7 | 8 | /** 9 | * Sets the implementation of GridSampler used by the library. One global 10 | * instance is stored, which may sound problematic. But, the implementation provided 11 | * ought to be appropriate for the entire platform, and all uses of this library 12 | * in the whole lifetime of the JVM. For instance, an Android activity can swap in 13 | * an implementation that takes advantage of native platform libraries. 14 | * 15 | * @param newGridSampler The platform-specific object to install. 16 | */ 17 | public static setGridSampler(newGridSampler: GridSampler): void { 18 | GridSamplerInstance.gridSampler = newGridSampler 19 | } 20 | 21 | /** 22 | * @return the current implementation of GridSampler 23 | */ 24 | public static getInstance(): GridSampler { 25 | return GridSamplerInstance.gridSampler 26 | } 27 | 28 | } -------------------------------------------------------------------------------- /src/core/common/detector/MathUtils.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 ZXing authors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | /*namespace com.google.zxing.common.detector {*/ 18 | 19 | /** 20 | * General math-related and numeric utility functions. 21 | */ 22 | export default class MathUtils { 23 | 24 | private MathUtils() { 25 | } 26 | 27 | /** 28 | * Ends up being a bit faster than {@link Math#round(float)}. This merely rounds its 29 | * argument to the nearest int, where x.5 rounds up to x+1. Semantics of this shortcut 30 | * differ slightly from {@link Math#round(float)} in that half rounds down for negative 31 | * values. -2.5 rounds to -3, not -2. For purposes here it makes no difference. 32 | * 33 | * @param d real value to round 34 | * @return nearest {@code int} 35 | */ 36 | public static round(d: number/*float*/): number /*int*/ { 37 | if (NaN === d) return 0 38 | if (d <= Number.MIN_SAFE_INTEGER) return Number.MIN_SAFE_INTEGER 39 | if (d >= Number.MAX_SAFE_INTEGER) return Number.MAX_SAFE_INTEGER 40 | return /*(int) */(d + (d < 0.0 ? -0.5 : 0.5)) | 0 41 | } 42 | // TYPESCRIPTPORT: maybe remove round method and call directly Math.round, it looks like it doesn't make sense for js 43 | 44 | /** 45 | * @param aX point A x coordinate 46 | * @param aY point A y coordinate 47 | * @param bX point B x coordinate 48 | * @param bY point B y coordinate 49 | * @return Euclidean distance between points A and B 50 | */ 51 | public static distance(aX: number/*float|int*/, aY: number/*float|int*/, bX: number/*float|int*/, bY: number/*float|int*/): number/*float*/ { 52 | const xDiff = aX - bX 53 | const yDiff = aY - bY 54 | return /*(float) */Math.sqrt(xDiff * xDiff + yDiff * yDiff) 55 | } 56 | 57 | /** 58 | * @param aX point A x coordinate 59 | * @param aY point A y coordinate 60 | * @param bX point B x coordinate 61 | * @param bY point B y coordinate 62 | * @return Euclidean distance between points A and B 63 | */ 64 | // public static distance(aX: number /*int*/, aY: number /*int*/, bX: number /*int*/, bY: number /*int*/): float { 65 | // const xDiff = aX - bX 66 | // const yDiff = aY - bY 67 | // return (float) Math.sqrt(xDiff * xDiff + yDiff * yDiff); 68 | // } 69 | 70 | /** 71 | * @param array values to sum 72 | * @return sum of values in array 73 | */ 74 | public static sum(array: Int32Array): number /*int*/ { 75 | let count = 0 76 | for (let i = 0, length = array.length; i != length; i++) { 77 | const a = array[i] 78 | count += a 79 | } 80 | return count 81 | } 82 | 83 | } 84 | -------------------------------------------------------------------------------- /src/core/common/reedsolomon/ReedSolomonEncoder.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008 ZXing authors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | /*namespace com.google.zxing.common.reedsolomon {*/ 18 | 19 | /*import java.util.ArrayList;*/ 20 | /*import java.util.List;*/ 21 | 22 | import GenericGF from './GenericGF' 23 | import GenericGFPoly from './GenericGFPoly' 24 | import Exception from './../../Exception' 25 | import System from './../../util/System' 26 | 27 | /** 28 | *

Implements Reed-Solomon encoding, as the name implies.

29 | * 30 | * @author Sean Owen 31 | * @author William Rucklidge 32 | */ 33 | export default class ReedSolomonEncoder { 34 | 35 | private field: GenericGF 36 | private cachedGenerators: GenericGFPoly[] 37 | 38 | public constructor(field: GenericGF) { 39 | this.field = field 40 | this.cachedGenerators = [] 41 | this.cachedGenerators.push(new GenericGFPoly(field, Int32Array.from([1]))); 42 | } 43 | 44 | private buildGenerator(degree: number /*int*/): GenericGFPoly { 45 | const cachedGenerators = this.cachedGenerators 46 | if (degree >= cachedGenerators.length) { 47 | let lastGenerator = cachedGenerators[cachedGenerators.length - 1] 48 | const field = this.field 49 | for (let d = cachedGenerators.length; d <= degree; d++) { 50 | const nextGenerator = lastGenerator.multiply( 51 | new GenericGFPoly(field, Int32Array.from([1, field.exp(d - 1 + field.getGeneratorBase()) ]))); 52 | cachedGenerators.push(nextGenerator) 53 | lastGenerator = nextGenerator 54 | } 55 | } 56 | return cachedGenerators[degree] 57 | } 58 | 59 | public encode(toEncode: Int32Array, ecBytes: number /*int*/): void { 60 | if (ecBytes === 0) { 61 | throw new Exception(Exception.IllegalArgumentException, "No error correction bytes") 62 | } 63 | const dataBytes = toEncode.length - ecBytes 64 | if (dataBytes <= 0) { 65 | throw new Exception(Exception.IllegalArgumentException, "No data bytes provided") 66 | } 67 | const generator = this.buildGenerator(ecBytes) 68 | const infoCoefficients: Int32Array = new Int32Array(dataBytes) 69 | System.arraycopy(toEncode, 0, infoCoefficients, 0, dataBytes) 70 | let info = new GenericGFPoly(this.field, infoCoefficients) 71 | info = info.multiplyByMonomial(ecBytes, 1) 72 | const remainder = info.divide(generator)[1] 73 | const coefficients = remainder.getCoefficients() 74 | const numZeroCoefficients = ecBytes - coefficients.length 75 | for (let i = 0; i < numZeroCoefficients; i++) { 76 | toEncode[dataBytes + i] = 0 77 | } 78 | System.arraycopy(coefficients, 0, toEncode, dataBytes + numZeroCoefficients, coefficients.length) 79 | } 80 | 81 | } 82 | -------------------------------------------------------------------------------- /src/core/qrcode/decoder/ECB.ts: -------------------------------------------------------------------------------- 1 | /** 2 | *

Encapsulates the parameters for one error-correction block in one symbol version. 3 | * This includes the number of data codewords, and the number of times a block with these 4 | * parameters is used consecutively in the QR code version's format.

5 | */ 6 | export default class ECB { 7 | private count: number /*int*/ 8 | private dataCodewords: number /*int*/ 9 | 10 | public constructor(count: number /*int*/, dataCodewords: number /*int*/) { 11 | this.count = count 12 | this.dataCodewords = dataCodewords 13 | } 14 | 15 | public getCount(): number /*int*/ { 16 | return this.count 17 | } 18 | 19 | public getDataCodewords(): number /*int*/ { 20 | return this.dataCodewords 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /src/core/qrcode/decoder/ECBlocks.ts: -------------------------------------------------------------------------------- 1 | import ECB from './ECB' 2 | 3 | /** 4 | *

Encapsulates a set of error-correction blocks in one symbol version. Most versions will 5 | * use blocks of differing sizes within one version, so, this encapsulates the parameters for 6 | * each set of blocks. It also holds the number of error-correction codewords per block since it 7 | * will be the same across all blocks within one version.

8 | */ 9 | export default class ECBlocks { 10 | private ecBlocks: ECB[] 11 | 12 | public constructor(private ecCodewordsPerBlock: number /*int*/, ...ecBlocks: ECB[]) { 13 | this.ecBlocks = ecBlocks 14 | } 15 | 16 | public getECCodewordsPerBlock(): number /*int*/ { 17 | return this.ecCodewordsPerBlock 18 | } 19 | 20 | public getNumBlocks(): number /*int*/ { 21 | let total = 0 22 | const ecBlocks = this.ecBlocks 23 | for (const ecBlock of ecBlocks) { 24 | total += ecBlock.getCount() 25 | } 26 | return total 27 | } 28 | 29 | public getTotalECCodewords(): number /*int*/ { 30 | return this.ecCodewordsPerBlock * this.getNumBlocks(); 31 | } 32 | 33 | public getECBlocks(): ECB[] { 34 | return this.ecBlocks 35 | } 36 | } -------------------------------------------------------------------------------- /src/core/qrcode/decoder/QRCodeDecoderMetaData.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013 ZXing authors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | /*namespace com.google.zxing.qrcode.decoder {*/ 18 | 19 | import ResultPoint from './../../ResultPoint' 20 | 21 | /** 22 | * Meta-data container for QR Code decoding. Instances of this class may be used to convey information back to the 23 | * decoding caller. Callers are expected to process this. 24 | * 25 | * @see com.google.zxing.common.DecoderResult#getOther() 26 | */ 27 | export default class QRCodeDecoderMetaData { 28 | 29 | 30 | public constructor(private mirrored: boolean) {} 31 | 32 | /** 33 | * @return true if the QR Code was mirrored. 34 | */ 35 | public isMirrored(): boolean { 36 | return this.mirrored 37 | } 38 | 39 | /** 40 | * Apply the result points' order correction due to mirroring. 41 | * 42 | * @param points Array of points to apply mirror correction to. 43 | */ 44 | public applyMirroredCorrection(points: Array): void { 45 | if (!this.mirrored || points === null || points.length < 3) { 46 | return 47 | } 48 | const bottomLeft = points[0] 49 | points[0] = points[2] 50 | points[2] = bottomLeft 51 | // No need to 'fix' top-left and alignment pattern. 52 | } 53 | 54 | } 55 | -------------------------------------------------------------------------------- /src/core/qrcode/detector/AlignmentPattern.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2007 ZXing authors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | /*namespace com.google.zxing.qrcode.detector {*/ 18 | 19 | import ResultPoint from './../../ResultPoint' 20 | 21 | /** 22 | *

Encapsulates an alignment pattern, which are the smaller square patterns found in 23 | * all but the simplest QR Codes.

24 | * 25 | * @author Sean Owen 26 | */ 27 | export default class AlignmentPattern extends ResultPoint { 28 | 29 | public constructor(posX: number/*float*/, posY: number/*float*/, private estimatedModuleSize: number/*float*/) { 30 | super(posX, posY) 31 | } 32 | 33 | /** 34 | *

Determines if this alignment pattern "about equals" an alignment pattern at the stated 35 | * position and size -- meaning, it is at nearly the same center with nearly the same size.

36 | */ 37 | public aboutEquals(moduleSize: number/*float*/, i: number/*float*/, j: number/*float*/): boolean { 38 | if (Math.abs(i - this.getY()) <= moduleSize && Math.abs(j - this.getX()) <= moduleSize) { 39 | const moduleSizeDiff: number/*float*/ = Math.abs(moduleSize - this.estimatedModuleSize) 40 | return moduleSizeDiff <= 1.0 || moduleSizeDiff <= this.estimatedModuleSize 41 | } 42 | return false 43 | } 44 | 45 | /** 46 | * Combines this object's current estimate of a finder pattern position and module size 47 | * with a new estimate. It returns a new {@code FinderPattern} containing an average of the two. 48 | */ 49 | public combineEstimate(i: number/*float*/, j: number/*float*/, newModuleSize: number/*float*/): AlignmentPattern { 50 | const combinedX: number/*float*/ = (this.getX() + j) / 2.0 51 | const combinedY: number/*float*/ = (this.getY() + i) / 2.0 52 | const combinedModuleSize: number/*float*/ = (this.estimatedModuleSize + newModuleSize) / 2.0 53 | return new AlignmentPattern(combinedX, combinedY, combinedModuleSize) 54 | } 55 | 56 | } -------------------------------------------------------------------------------- /src/core/qrcode/detector/FinderPattern.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2007 ZXing authors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | /*namespace com.google.zxing.qrcode.detector {*/ 18 | 19 | import ResultPoint from './../../ResultPoint' 20 | 21 | /** 22 | *

Encapsulates a finder pattern, which are the three square patterns found in 23 | * the corners of QR Codes. It also encapsulates a count of similar finder patterns, 24 | * as a convenience to the finder's bookkeeping.

25 | * 26 | * @author Sean Owen 27 | */ 28 | export default class FinderPattern extends ResultPoint { 29 | 30 | // FinderPattern(posX: number/*float*/, posY: number/*float*/, estimatedModuleSize: number/*float*/) { 31 | // this(posX, posY, estimatedModuleSize, 1) 32 | // } 33 | 34 | public constructor(posX: number/*float*/, posY: number/*float*/, private estimatedModuleSize: number/*float*/, private count?: number /*int*/) { 35 | super(posX, posY) 36 | if (undefined === count) { 37 | this.count = 1 38 | } 39 | } 40 | 41 | public getEstimatedModuleSize(): number/*float*/ { 42 | return this.estimatedModuleSize 43 | } 44 | 45 | public getCount(): number /*int*/ { 46 | return this.count 47 | } 48 | 49 | /* 50 | void incrementCount() { 51 | this.count++ 52 | } 53 | */ 54 | 55 | /** 56 | *

Determines if this finder pattern "about equals" a finder pattern at the stated 57 | * position and size -- meaning, it is at nearly the same center with nearly the same size.

58 | */ 59 | public aboutEquals(moduleSize: number/*float*/, i: number/*float*/, j: number/*float*/): boolean { 60 | if (Math.abs(i - this.getY()) <= moduleSize && Math.abs(j - this.getX()) <= moduleSize) { 61 | const moduleSizeDiff: number/*float*/ = Math.abs(moduleSize - this.estimatedModuleSize) 62 | return moduleSizeDiff <= 1.0 || moduleSizeDiff <= this.estimatedModuleSize 63 | } 64 | return false 65 | } 66 | 67 | /** 68 | * Combines this object's current estimate of a finder pattern position and module size 69 | * with a new estimate. It returns a new {@code FinderPattern} containing a weighted average 70 | * based on count. 71 | */ 72 | public combineEstimate(i: number/*float*/, j: number/*float*/, newModuleSize: number/*float*/): FinderPattern { 73 | const combinedCount = this.count + 1 74 | const combinedX: number/*float*/ = (this.count * this.getX() + j) / combinedCount; 75 | const combinedY: number/*float*/ = (this.count * this.getY() + i) / combinedCount; 76 | const combinedModuleSize: number/*float*/ = (this.count * this.estimatedModuleSize + newModuleSize) / combinedCount; 77 | return new FinderPattern(combinedX, combinedY, combinedModuleSize, combinedCount) 78 | } 79 | 80 | } 81 | -------------------------------------------------------------------------------- /src/core/qrcode/detector/FinderPatternInfo.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2007 ZXing authors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | /*namespace com.google.zxing.qrcode.detector {*/ 18 | 19 | import FinderPattern from './FinderPattern' 20 | 21 | /** 22 | *

Encapsulates information about finder patterns in an image, including the location of 23 | * the three finder patterns, and their estimated module size.

24 | * 25 | * @author Sean Owen 26 | */ 27 | export default class FinderPatternInfo { 28 | 29 | private bottomLeft: FinderPattern 30 | private topLeft: FinderPattern 31 | private topRight: FinderPattern 32 | 33 | public constructor(patternCenters: FinderPattern[]) { 34 | this.bottomLeft = patternCenters[0] 35 | this.topLeft = patternCenters[1] 36 | this.topRight = patternCenters[2] 37 | } 38 | 39 | public getBottomLeft(): FinderPattern { 40 | return this.bottomLeft 41 | } 42 | 43 | public getTopLeft(): FinderPattern { 44 | return this.topLeft 45 | } 46 | 47 | public getTopRight(): FinderPattern { 48 | return this.topRight 49 | } 50 | 51 | } 52 | -------------------------------------------------------------------------------- /src/core/qrcode/encoder/BlockPair.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008 ZXing authors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | /*namespace com.google.zxing.qrcode.encoder {*/ 18 | 19 | export default class BlockPair { 20 | 21 | public constructor(private dataBytes: Uint8Array, private errorCorrectionBytes: Uint8Array) {} 22 | 23 | public getDataBytes(): Uint8Array { 24 | return this.dataBytes 25 | } 26 | 27 | public getErrorCorrectionBytes(): Uint8Array { 28 | return this.errorCorrectionBytes 29 | } 30 | 31 | } 32 | -------------------------------------------------------------------------------- /src/core/util/Arrays.ts: -------------------------------------------------------------------------------- 1 | import System from './System' 2 | 3 | export default class Arrays { 4 | public static equals(first: any, second: any): boolean { 5 | if (!first) { 6 | return false 7 | } 8 | if (!second) { 9 | return false 10 | } 11 | if (!first.length) { 12 | return false 13 | } 14 | if (!second.length) { 15 | return false 16 | } 17 | if (first.length !== second.length) { 18 | return false 19 | } 20 | for (let i = 0, length = first.length; i < length; i++) { 21 | if (first[i] !== second[i]) { 22 | return false 23 | } 24 | } 25 | return true 26 | } 27 | 28 | public static hashCode(a: any) { 29 | if (a === null) { 30 | return 0 31 | } 32 | let result = 1 33 | for (const element of a) { 34 | result = 31 * result + element 35 | } 36 | return result 37 | } 38 | 39 | public static fillUint8Array(a: Uint8Array, value: number) { 40 | for (let i = 0; i !== a.length; i++) { 41 | a[i] = value 42 | } 43 | } 44 | 45 | public static copyOf(original: Int32Array, newLength: number) { 46 | const copy = new Int32Array(newLength) 47 | System.arraycopy(original, 0, copy, 0, Math.min(original.length, newLength)) 48 | return copy 49 | } 50 | 51 | /* 52 | * Returns the index of of the element in a sorted array or (-n-1) where n is the insertion point 53 | * for the new element. 54 | * Parameters: 55 | * ar - A sorted array 56 | * el - An element to search for 57 | * comparator - A comparator function. The function takes two arguments: (a, b) and returns: 58 | * a negative number if a is less than b; 59 | * 0 if a is equal to b; 60 | * a positive number of a is greater than b. 61 | * The array may contain duplicate elements. If there are more than one equal elements in the array, 62 | * the returned value can be the index of any one of the equal elements. 63 | * 64 | * http://jsfiddle.net/aryzhov/pkfst550/ 65 | */ 66 | public static binarySearch(ar: Int32Array, el: number, comparator?: (a: number, b: number) => number): number { 67 | if (undefined === comparator) { 68 | comparator = Arrays.numberComparator 69 | } 70 | let m = 0 71 | let n = ar.length - 1 72 | while (m <= n) { 73 | const k = (n + m) >> 1 74 | const cmp = comparator(el, ar[k]) 75 | if (cmp > 0) { 76 | m = k + 1 77 | } else if (cmp < 0) { 78 | n = k - 1 79 | } else { 80 | return k 81 | } 82 | } 83 | return -m - 1 84 | } 85 | 86 | public static numberComparator(a: number, b: number) { 87 | return a - b 88 | } 89 | } 90 | -------------------------------------------------------------------------------- /src/core/util/Float.ts: -------------------------------------------------------------------------------- 1 | export default class Float { 2 | public static floatToIntBits(f: number): number { 3 | return f 4 | } 5 | } -------------------------------------------------------------------------------- /src/core/util/Integer.ts: -------------------------------------------------------------------------------- 1 | 2 | export default class Integer { 3 | public static MIN_VALUE_32_BITS = -2147483648 4 | 5 | public static numberOfTrailingZeros(i: number): number { 6 | let y; 7 | if (i === 0) return 32 8 | let n = 31 9 | y = i << 16 10 | if (y !== 0) { 11 | n -= 16 12 | i = y 13 | } 14 | y = i << 8 15 | if (y !== 0) { 16 | n -= 8 17 | i = y 18 | } 19 | y = i << 4 20 | if (y !== 0) { 21 | n -= 4 22 | i = y 23 | } 24 | y = i << 2 25 | if (y !== 0) { 26 | n -= 2 27 | i = y 28 | } 29 | return n - ((i << 1) >>> 31) 30 | } 31 | 32 | public static numberOfLeadingZeros(i: number): number { 33 | // HD, Figure 5-6 34 | if (i === 0) { 35 | return 32 36 | } 37 | let n = 1 38 | if (i >>> 16 === 0) { 39 | n += 16 40 | i <<= 16 41 | } 42 | if (i >>> 24 === 0) { 43 | n += 8 44 | i <<= 8 45 | } 46 | if (i >>> 28 === 0) { 47 | n += 4 48 | i <<= 4 49 | } 50 | if (i >>> 30 === 0) { 51 | n += 2 52 | i <<= 2 53 | } 54 | n -= i >>> 31 55 | return n 56 | } 57 | 58 | public static toHexString(i: number) { 59 | return i.toString(16) 60 | } 61 | 62 | // Returns the number of one-bits in the two's complement binary representation of the specified int value. This function is sometimes referred to as the population count. 63 | // Returns: 64 | // the number of one-bits in the two's complement binary representation of the specified int value. 65 | public static bitCount(i: number): number { 66 | // HD, Figure 5-2 67 | i = i - ((i >>> 1) & 0x55555555) 68 | i = (i & 0x33333333) + ((i >>> 2) & 0x33333333) 69 | i = (i + (i >>> 4)) & 0x0f0f0f0f 70 | i = i + (i >>> 8) 71 | i = i + (i >>> 16) 72 | return i & 0x3f 73 | } 74 | } -------------------------------------------------------------------------------- /src/core/util/StringBuilder.ts: -------------------------------------------------------------------------------- 1 | export default class StringBuilder { 2 | public constructor(private value: string = '') { 3 | 4 | } 5 | public append(s: string | number): StringBuilder { 6 | if (typeof s === 'string') { 7 | this.value += s.toString() 8 | } else { 9 | this.value += String.fromCharCode(s) 10 | } 11 | return this 12 | } 13 | 14 | public length(): number { 15 | return this.value.length 16 | } 17 | 18 | public charAt(n: number): string { 19 | return this.value.charAt(n) 20 | } 21 | 22 | public deleteCharAt(n: number) { 23 | this.value = this.value.substr(0, n) + this.value.substring(n + 1) 24 | } 25 | 26 | public setCharAt(n: number, c: string) { 27 | this.value = this.value.substr(0, n) + c + this.value.substr(n + 1) 28 | } 29 | 30 | public toString(): string { 31 | return this.value 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/core/util/System.ts: -------------------------------------------------------------------------------- 1 | export default class System { 2 | // public static void arraycopy(Object src, int srcPos, Object dest, int destPos, int length) 3 | public static arraycopy(src: any, srcPos: number, dest: any, destPos: number, length: number) { 4 | // TODO: better use split or set? 5 | let i = srcPos 6 | let j = destPos 7 | let c = length 8 | while (c--) { 9 | dest[j++] = src[i++] 10 | } 11 | } 12 | 13 | public static currentTimeMillis() { 14 | return Date.now() 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/test/core/PlanarYUVLuminanceSourceTestCase.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014 ZXing authors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License") 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | /*package com.google.zxing;*/ 18 | 19 | import 'mocha' 20 | import * as assert from 'assert' 21 | import AssertUtils from './util/AssertUtils' 22 | import PlanarYUVLuminanceSource from './../../core/PlanarYUVLuminanceSource' 23 | import System from './../../core/util/System' 24 | 25 | describe("PlanarYUVLuminanceSourceTestCase", () => { 26 | 27 | const YUV: Uint8ClampedArray = Uint8ClampedArray.from([ 28 | 0, 1, 1, 2, 3, 5, 29 | 8, 13, 21, 34, 55, 89, 30 | 0, -1, -1, -2, -3, -5, 31 | -8, -13, -21, -34, -55, -89, 32 | 127, 127, 127, 127, 127, 127, 33 | 127, 127, 127, 127, 127, 127, 34 | ]) 35 | 36 | const COLS: number /*int*/ = 6 37 | const ROWS: number /*int*/ = 4 38 | const Y = new Uint8ClampedArray(COLS * ROWS) 39 | 40 | System.arraycopy(YUV, 0, Y, 0, Y.length) 41 | 42 | it("testNoCrop", () => { 43 | const source = new PlanarYUVLuminanceSource(YUV, COLS, ROWS, 0, 0, COLS, ROWS, false) 44 | assertTypedArrayEquals(Y, 0, source.getMatrix(), 0, Y.length); 45 | for (let r: number /*int*/ = 0; r < ROWS; r++) { 46 | assertTypedArrayEquals(Y, r * COLS, source.getRow(r, null), 0, COLS); 47 | } 48 | }) 49 | 50 | it("testCrop", () => { 51 | const source = 52 | new PlanarYUVLuminanceSource(YUV, COLS, ROWS, 1, 1, COLS - 2, ROWS - 2, false) 53 | assert.strictEqual(source.isCropSupported(), true) 54 | const cropMatrix: Uint8ClampedArray = source.getMatrix() 55 | for (let r: number /*int*/ = 0; r < ROWS - 2; r++) { 56 | assertTypedArrayEquals(Y, (r + 1) * COLS + 1, cropMatrix, r * (COLS - 2), COLS - 2) 57 | } 58 | for (let r: number /*int*/ = 0; r < ROWS - 2; r++) { 59 | assertTypedArrayEquals(Y, (r + 1) * COLS + 1, source.getRow(r, null), 0, COLS - 2) 60 | } 61 | }) 62 | 63 | it("testThumbnail", () => { 64 | const source = 65 | new PlanarYUVLuminanceSource(YUV, COLS, ROWS, 0, 0, COLS, ROWS, false) 66 | AssertUtils.typedArraysAreEqual( 67 | Int32Array.from([ 0xFF000000, 0xFF010101, 0xFF030303, 0xFF000000, 0xFFFFFFFF, 0xFFFDFDFD ]), 68 | source.renderThumbnail()) 69 | }) 70 | 71 | function assertTypedArrayEquals(expected: Uint8ClampedArray, expectedFrom: number /*int*/, 72 | actual: Uint8ClampedArray, actualFrom: number /*int*/, 73 | length: number /*int*/) { 74 | for (let i: number /*int*/ = 0; i < length; i++) { 75 | assert.strictEqual(actual[actualFrom + i], expected[expectedFrom + i]) 76 | } 77 | } 78 | 79 | }) 80 | -------------------------------------------------------------------------------- /src/test/core/RGBLuminanceSourceTestCase.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014 ZXing authors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License") 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | /*package com.google.zxing;*/ 18 | 19 | import 'mocha' 20 | import * as assert from 'assert' 21 | import AssertUtils from './util/AssertUtils' 22 | import LuminanceSource from '../../core/LuminanceSource' 23 | import RGBLuminanceSource from '../../core/RGBLuminanceSource' 24 | 25 | describe("RGBLuminanceSourceTestCase", () => { 26 | 27 | const SOURCE = new RGBLuminanceSource(Int32Array.from([ 28 | 0x000000, 0x7F7F7F, 0xFFFFFF, 29 | 0xFF0000, 0x00FF00, 0x0000FF, 30 | 0x0000FF, 0x00FF00, 0xFF0000]), 3, 3) 31 | 32 | it("testCrop", () => { 33 | assert.strictEqual(SOURCE.isCropSupported(), true) 34 | const cropped: LuminanceSource = SOURCE.crop(1, 1, 1, 1) 35 | assert.strictEqual(cropped.getHeight(), 1) 36 | assert.strictEqual(cropped.getWidth(), 1) 37 | assert.strictEqual(AssertUtils.typedArraysAreEqual(Uint8ClampedArray.from([0x7F]), cropped.getRow(0, null)), true) 38 | }) 39 | 40 | it("testMatrix", () => { 41 | assert.strictEqual(AssertUtils.typedArraysAreEqual(Uint8ClampedArray.from([0x00, 0x7F, 0xFF, 0x3F, 0x7F, 0x3F, 0x3F, 0x7F, 0x3F]), 42 | SOURCE.getMatrix()), true) 43 | const croppedFullWidth: LuminanceSource = SOURCE.crop(0, 1, 3, 2) 44 | assert.strictEqual(AssertUtils.typedArraysAreEqual(Uint8ClampedArray.from([0x3F, 0x7F, 0x3F, 0x3F, 0x7F, 0x3F]), 45 | croppedFullWidth.getMatrix()), true) 46 | const croppedCorner: LuminanceSource = SOURCE.crop(1, 1, 2, 2) 47 | assert.strictEqual(AssertUtils.typedArraysAreEqual(Uint8ClampedArray.from([0x7F, 0x3F, 0x7F, 0x3F]), 48 | croppedCorner.getMatrix()), true) 49 | }) 50 | 51 | it("testGetRow", () => { 52 | assert.strictEqual(AssertUtils.typedArraysAreEqual(Uint8ClampedArray.from([0x3F, 0x7F, 0x3F]), SOURCE.getRow(2, new Uint8ClampedArray(3))), true) 53 | }) 54 | 55 | it("testToString", () => { 56 | assert.strictEqual(SOURCE.toString(), "#+ \n#+#\n#+#\n") 57 | }) 58 | 59 | }) 60 | -------------------------------------------------------------------------------- /src/test/core/common/BitSourceBuilder.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008 ZXing authors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License") 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | /*package com.google.zxing.common;*/ 18 | 19 | /*import java.io.ByteArrayOutputStream;*/ 20 | 21 | /** 22 | * Class that lets one easily build an array of bytes by appending bits at a time. 23 | * 24 | * @author Sean Owen 25 | */ 26 | export default class BitSourceBuilder { 27 | 28 | private output: Array 29 | private nextByte: number /*int*/ 30 | private bitsLeftInNextByte: number /*int*/ 31 | 32 | public constructor() { 33 | this.output = new Array() 34 | this.nextByte = 0 35 | this.bitsLeftInNextByte = 8 36 | } 37 | 38 | public write(value: number /*int*/, numBits: number /*int*/): void { 39 | if (numBits <= this.bitsLeftInNextByte) { 40 | const nb = (this.nextByte << numBits) & 0xFFFFFFFF 41 | this.nextByte = nb | value 42 | this.bitsLeftInNextByte -= numBits 43 | if (this.bitsLeftInNextByte === 0) { 44 | const byte = this.nextByte & 0xFF 45 | this.output.push(byte) 46 | this.nextByte = 0 47 | this.bitsLeftInNextByte = 8 48 | } 49 | } else { 50 | const bitsToWriteNow: number /*int*/ = this. bitsLeftInNextByte 51 | const numRestOfBits: number /*int*/ = numBits - bitsToWriteNow 52 | const mask: number /*int*/ = 0xFF >> (8 - bitsToWriteNow) 53 | const valueToWriteNow: number /*int*/ = (value >>> numRestOfBits) & mask 54 | this.write(valueToWriteNow, bitsToWriteNow) 55 | this.write(value, numRestOfBits) 56 | } 57 | } 58 | 59 | public toByteArray(): Uint8Array { 60 | if (this.bitsLeftInNextByte < 8) { 61 | this.write(0, this.bitsLeftInNextByte) 62 | } 63 | return Uint8Array.from(this.output) 64 | } 65 | 66 | } -------------------------------------------------------------------------------- /src/test/core/common/BitSourceTestCase.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2007 ZXing authors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License") 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | /*package com.google.zxing.common;*/ 18 | 19 | import 'mocha' 20 | import * as assert from 'assert' 21 | import BitSource from './../../../core/common/BitSource' 22 | 23 | /** 24 | * @author Sean Owen 25 | */ 26 | describe("BitSourceTestCase", () => { 27 | 28 | it("testSource", () => { 29 | const bytes = Uint8Array.from([/*(byte)*/ 1, /*(byte)*/ 2, /*(byte)*/ 3, /*(byte)*/ 4, /*(byte)*/ 5]) 30 | const source = new BitSource(bytes) 31 | assert.strictEqual(source.available(), 40) 32 | assert.strictEqual(source.readBits(1), 0) 33 | assert.strictEqual(source.available(), 39) 34 | assert.strictEqual(source.readBits(6), 0) 35 | assert.strictEqual(source.available(), 33) 36 | assert.strictEqual(source.readBits(1), 1) 37 | assert.strictEqual(source.available(), 32) 38 | assert.strictEqual(source.readBits(8), 2) 39 | assert.strictEqual(source.available(), 24) 40 | assert.strictEqual(source.readBits(10), 12) 41 | assert.strictEqual(source.available(), 14) 42 | assert.strictEqual(source.readBits(8), 16) 43 | assert.strictEqual(source.available(), 6) 44 | assert.strictEqual(source.readBits(6), 5) 45 | assert.strictEqual(source.available(), 0) 46 | }) 47 | 48 | }) -------------------------------------------------------------------------------- /src/test/core/common/PerspectiveTransformTestCase.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2007 ZXing authors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License") 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | /*package com.google.zxing.common;*/ 18 | 19 | import 'mocha' 20 | import * as assert from 'assert' 21 | import PerspectiveTransform from './../../../core/common/PerspectiveTransform' 22 | 23 | /** 24 | * @author Sean Owen 25 | */ 26 | describe("PerspectiveTransformTestCase", () => { 27 | 28 | const EPSILON: number/*float*/ = 1.0E-4 29 | 30 | it("testSquareToQuadrilateral", () => { 31 | const pt = PerspectiveTransform.squareToQuadrilateral(2.0, 3.0, 10.0, 4.0, 16.0, 15.0, 4.0, 9.0) 32 | assertPointEquals(2.0, 3.0, 0.0, 0.0, pt) 33 | assertPointEquals(10.0, 4.0, 1.0, 0.0, pt) 34 | assertPointEquals(4.0, 9.0, 0.0, 1.0, pt) 35 | assertPointEquals(16.0, 15.0, 1.0, 1.0, pt) 36 | assertPointEquals(6.535211, 6.8873234, 0.5, 0.5, pt) 37 | assertPointEquals(48.0, 42.42857, 1.5, 1.5, pt) 38 | }) 39 | 40 | it("testQuadrilateralToQuadrilateral", () => { 41 | const pt = PerspectiveTransform.quadrilateralToQuadrilateral( 42 | 2.0, 3.0, 10.0, 4.0, 16.0, 15.0, 4.0, 9.0, 43 | 103.0, 110.0, 300.0, 120.0, 290.0, 270.0, 150.0, 280.0) 44 | assertPointEquals(103.0, 110.0, 2.0, 3.0, pt) 45 | assertPointEquals(300.0, 120.0, 10.0, 4.0, pt) 46 | assertPointEquals(290.0, 270.0, 16.0, 15.0, pt) 47 | assertPointEquals(150.0, 280.0, 4.0, 9.0, pt) 48 | assertPointEquals(7.1516876, -64.60185, 0.5, 0.5, pt) 49 | assertPointEquals(328.09116, 334.16385, 50.0, 50.0, pt) 50 | }) 51 | 52 | function assertPointEquals(expectedX: number/*float*/, 53 | expectedY: number/*float*/, 54 | sourceX: number/*float*/, 55 | sourceY: number/*float*/, 56 | pt: PerspectiveTransform) { 57 | const points = Float32Array.from([sourceX, sourceY]) 58 | pt.transformPoints(points) 59 | assert.strictEqual(Math.abs(expectedX - points[0]) < EPSILON, true) 60 | assert.strictEqual(Math.abs(expectedY - points[1]) < EPSILON, true) 61 | } 62 | 63 | }) -------------------------------------------------------------------------------- /src/test/core/common/StringUtilsTestCase.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 ZXing authors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License") 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | /*package com.google.zxing.common;*/ 18 | 19 | import 'mocha' 20 | import * as assert from 'assert' 21 | 22 | import StringUtils from './../../../core/common/StringUtils' 23 | import CharacterSetECI from './../../../core/common/CharacterSetECI' 24 | 25 | /*import java.nio.charset.Charset;*/ 26 | 27 | describe("StringUtilsTestCase", () => { 28 | 29 | it("testShortShiftJIS_1", () => { 30 | // ÈáëÈ≠ö 31 | doTest(Uint8Array.from([/*(byte)*/ 0x8b, /*(byte)*/ 0xe0, /*(byte)*/ 0x8b, /*(byte)*/ 0x9b ]), CharacterSetECI.SJIS.getName()/*"SJIS"*/) 32 | }) 33 | 34 | it("testShortISO88591_1", () => { 35 | // b√•d 36 | doTest(Uint8Array.from([/*(byte)*/ 0x62, /*(byte)*/ 0xe5, /*(byte)*/ 0x64 ]), CharacterSetECI.ISO8859_1.getName()/*"ISO-8859-1"*/) 37 | }) 38 | 39 | it("testMixedShiftJIS_1", () => { 40 | // Hello Èáë! 41 | doTest(Uint8Array.from([/*(byte)*/ 0x48, /*(byte)*/ 0x65, /*(byte)*/ 0x6c, /*(byte)*/ 0x6c, /*(byte)*/ 0x6f, 42 | /*(byte)*/ 0x20, /*(byte)*/ 0x8b, /*(byte)*/ 0xe0, /*(byte)*/ 0x21 ]), 43 | "SJIS") 44 | }) 45 | 46 | function doTest(bytes: Uint8Array, charsetName: string): void { 47 | //const charset: Charset = Charset.forName(charsetName); 48 | const guessedName: string = StringUtils.guessEncoding(bytes, null) 49 | //const guessedEncoding: Charset = Charset.forName(guessedName); 50 | //assert.strictEqual(guessedEncoding, charset) 51 | assert.strictEqual(guessedName, charsetName) 52 | } 53 | 54 | /** 55 | * Utility for printing out a string in given encoding as a Java statement, since it's better 56 | * to write that into the Java source file rather than risk character encoding issues in the 57 | * source file itself. 58 | * 59 | * @param args command line arguments 60 | */ 61 | // funtion main(String[] args): void { 62 | // const text: string = args[0] 63 | // const charset: Charset = Charset.forName(args[1]); 64 | // const declaration = new StringBuilder() 65 | // declaration.append("Uint8Array.from([") 66 | // for (byte b : text.getBytes(charset)) { 67 | // declaration.append("/*(byte)*/ 0x") 68 | // declaration.append(Integer.toHexString(b & 0xFF)) 69 | // declaration.append(", ") 70 | // } 71 | // declaration.append('}') 72 | // System.out.println(declaration) 73 | // } 74 | 75 | }) 76 | -------------------------------------------------------------------------------- /src/test/core/common/TestResult.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008 ZXing authors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License") 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | /*package com.google.zxing.common;*/ 18 | 19 | export default class TestResult { 20 | 21 | public constructor( 22 | private mustPassCount: number /*int*/, 23 | private tryHarderCount: number /*int*/, 24 | private maxMisreads: number /*int*/, 25 | private maxTryHarderMisreads: number /*int*/, 26 | private rotation: number/*float*/) { 27 | } 28 | 29 | public getMustPassCount(): number /*int*/ { 30 | return this.mustPassCount 31 | } 32 | 33 | public getTryHarderCount(): number /*int*/ { 34 | return this.tryHarderCount 35 | } 36 | 37 | public getMaxMisreads(): number /*int*/ { 38 | return this.maxMisreads 39 | } 40 | 41 | public getMaxTryHarderMisreads(): number /*int*/ { 42 | return this.maxTryHarderMisreads 43 | } 44 | 45 | public getRotation(): number/*float*/ { 46 | return this.rotation 47 | } 48 | 49 | } 50 | -------------------------------------------------------------------------------- /src/test/core/common/detector/MathUtilsTestCase.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014 ZXing authors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License") 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | /*package com.google.zxing.common.detector;*/ 18 | 19 | import 'mocha' 20 | import * as assert from 'assert' 21 | import MathUtils from './../../../../core/common/detector/MathUtils' 22 | 23 | describe("MathUtilsTestCase", () => { 24 | 25 | const EPSILON: number/*float*/ = 1.0E-8 26 | 27 | it("testRound", () => { 28 | assert.strictEqual(MathUtils.round(-1.0), -1) 29 | assert.strictEqual(MathUtils.round(0.0), 0) 30 | assert.strictEqual(MathUtils.round(1.0), 1) 31 | 32 | assert.strictEqual(MathUtils.round(1.9), 2) 33 | assert.strictEqual(MathUtils.round(2.1), 2) 34 | 35 | assert.strictEqual(MathUtils.round(2.5), 3) 36 | 37 | assert.strictEqual(MathUtils.round(-1.9), -2) 38 | assert.strictEqual(MathUtils.round(-2.1), -2) 39 | 40 | assert.strictEqual(MathUtils.round(-2.5), -3); // This differs from Math.round() 41 | 42 | assert.strictEqual(MathUtils.round(Number.MAX_SAFE_INTEGER), Number.MAX_SAFE_INTEGER) 43 | assert.strictEqual(MathUtils.round(Number.MIN_SAFE_INTEGER), Number.MIN_SAFE_INTEGER) 44 | 45 | assert.strictEqual(MathUtils.round(Number.POSITIVE_INFINITY), Number.MAX_SAFE_INTEGER) 46 | assert.strictEqual(MathUtils.round(Number.NEGATIVE_INFINITY), Number.MIN_SAFE_INTEGER) 47 | 48 | assert.strictEqual(MathUtils.round(NaN), 0) 49 | }) 50 | 51 | it("testDistance", () => { 52 | assert.strictEqual(Math.abs(MathUtils.distance(1.0, 2.0, 3.0, 4.0) - /*(float) */Math.sqrt(8.0)) < EPSILON, true) 53 | assert.strictEqual(Math.abs(MathUtils.distance(1.0, 2.0, 1.0, 2.0) - 0.0) < EPSILON, true) 54 | 55 | assert.strictEqual(Math.abs(MathUtils.distance(1, 2, 3, 4) - /*(float) */Math.sqrt(8.0)) < EPSILON, true) 56 | assert.strictEqual(Math.abs(MathUtils.distance(1, 2, 1, 2) - 0.0) < EPSILON, true) 57 | }) 58 | 59 | it("testSum", () => { 60 | assert.strictEqual(MathUtils.sum(Int32Array.from([])), 0) 61 | assert.strictEqual(MathUtils.sum(Int32Array.from([1])), 1) 62 | assert.strictEqual(MathUtils.sum(Int32Array.from([1, 3])), 4) 63 | assert.strictEqual(MathUtils.sum(Int32Array.from([-1, 1])), 0) 64 | }) 65 | 66 | }) 67 | -------------------------------------------------------------------------------- /src/test/core/qrcode/HybridBinarizerTestCase.ts: -------------------------------------------------------------------------------- 1 | import * as assert from 'assert' 2 | import 'mocha' 3 | import HybridBinarizer from '../../../core/common/HybridBinarizer' 4 | import SharpImageLuminanceSource from '../SharpImageLuminanceSource' 5 | import SharpImage from '../util/SharpImage' 6 | 7 | const path = require('path') 8 | 9 | describe('HybridBinarizerTestCase', () => { 10 | it('testHybridBinarizer', (done) => { 11 | SharpImage.loadWithRotations(path.resolve('src/test/core/resources/blackbox/common/simple.png'), 12 | [0], 13 | (err, images: Map) => { 14 | if (err) { 15 | assert.ok(false, err) 16 | done(err) 17 | //console.error(err) 18 | } else { 19 | const image = images.get(0) 20 | const source = new SharpImageLuminanceSource(image) 21 | const test = new HybridBinarizer(source) 22 | const matrix = test.getBlackMatrix() 23 | assert.equal(0, matrix.get(13, 12)) 24 | assert.equal(1, matrix.get(13, 13)) 25 | done() 26 | } 27 | }) 28 | }, 29 | ) 30 | }) 31 | -------------------------------------------------------------------------------- /src/test/core/qrcode/QRCodeBlackBox1TestCase.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008 ZXing authors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License") 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | /*package com.google.zxing.qrcode;*/ 18 | 19 | import 'mocha' 20 | import * as assert from 'assert' 21 | 22 | import BarcodeFormat from './../../../core/BarcodeFormat' 23 | import MultiFormatReader from './../../../core/MultiFormatReader' 24 | import AbstractBlackBoxTestCase from './../common/AbstractBlackBoxTestCase' 25 | 26 | /** 27 | * @author Sean Owen 28 | */ 29 | class QRCodeBlackBox1TestCase extends AbstractBlackBoxTestCase { 30 | 31 | public constructor() { 32 | super("src/test/core/resources/blackbox/qrcode-1", new MultiFormatReader(), BarcodeFormat.QR_CODE) 33 | this.addTest(17, 17, 0.0) 34 | this.addTest(14, 14, 90.0) 35 | this.addTest(17, 17, 180.0) 36 | this.addTest(14, 14, 270.0) 37 | } 38 | 39 | } 40 | 41 | describe("QRCodeBlackBox1TestCase", () => { 42 | it("testBlackBox", (done) => { 43 | const test = new QRCodeBlackBox1TestCase() 44 | test.testBlackBox(() => { 45 | done() 46 | }) 47 | }) 48 | }) -------------------------------------------------------------------------------- /src/test/core/qrcode/QRCodeBlackBox2TestCase.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008 ZXing authors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License") 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | /*package com.google.zxing.qrcode;*/ 18 | 19 | import 'mocha' 20 | import * as assert from 'assert' 21 | 22 | import BarcodeFormat from './../../../core/BarcodeFormat' 23 | import MultiFormatReader from './../../../core/MultiFormatReader' 24 | import AbstractBlackBoxTestCase from './../common/AbstractBlackBoxTestCase' 25 | 26 | /** 27 | * @author Sean Owen 28 | */ 29 | export default class QRCodeBlackBox2TestCase extends AbstractBlackBoxTestCase { 30 | 31 | public constructor() { 32 | super("src/test/core/resources/blackbox/qrcode-2", new MultiFormatReader(), BarcodeFormat.QR_CODE) 33 | this.addTest(31, 31, 0.0) 34 | this.addTest(29, 29, 90.0) 35 | this.addTest(30, 30, 180.0) 36 | this.addTest(29, 29, 270.0) 37 | } 38 | 39 | } 40 | 41 | 42 | describe("QRCodeBlackBox2TestCase", () => { 43 | it("testBlackBox", (done) => { 44 | const test = new QRCodeBlackBox2TestCase() 45 | test.testBlackBox(() => { 46 | done() 47 | }) 48 | }) 49 | }) -------------------------------------------------------------------------------- /src/test/core/qrcode/QRCodeBlackBox3TestCase.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008 ZXing authors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License") 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | /*package com.google.zxing.qrcode;*/ 18 | 19 | import 'mocha' 20 | import * as assert from 'assert' 21 | 22 | import BarcodeFormat from './../../../core/BarcodeFormat' 23 | import MultiFormatReader from './../../../core/MultiFormatReader' 24 | import AbstractBlackBoxTestCase from './../common/AbstractBlackBoxTestCase' 25 | 26 | /** 27 | * @author dswitkin@google.com (Daniel Switkin) 28 | */ 29 | export default class QRCodeBlackBox3TestCase extends AbstractBlackBoxTestCase { 30 | 31 | public constructor() { 32 | super("src/test/core/resources/blackbox/qrcode-3", new MultiFormatReader(), BarcodeFormat.QR_CODE) 33 | this.addTest(38, 38, 0.0) 34 | this.addTest(38, 38, 90.0) 35 | this.addTest(36, 36, 180.0) 36 | this.addTest(39, 39, 270.0) 37 | } 38 | 39 | } 40 | 41 | describe("QRCodeBlackBox3TestCase", () => { 42 | it("testBlackBox", (done) => { 43 | const test = new QRCodeBlackBox3TestCase() 44 | test.testBlackBox(() => { 45 | done() 46 | }) 47 | }) 48 | }) -------------------------------------------------------------------------------- /src/test/core/qrcode/QRCodeBlackBox4TestCase.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008 ZXing authors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License") 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | /*package com.google.zxing.qrcode;*/ 18 | 19 | import 'mocha' 20 | import * as assert from 'assert' 21 | 22 | import BarcodeFormat from './../../../core/BarcodeFormat' 23 | import MultiFormatReader from './../../../core/MultiFormatReader' 24 | import AbstractBlackBoxTestCase from './../common/AbstractBlackBoxTestCase' 25 | 26 | /** 27 | * Tests of various QR Codes from t-shirts, which are notoriously not flat. 28 | * 29 | * @author dswitkin@google.com (Daniel Switkin) 30 | */ 31 | export default class QRCodeBlackBox4TestCase extends AbstractBlackBoxTestCase { 32 | 33 | public constructor() { 34 | super("src/test/core/resources/blackbox/qrcode-4", new MultiFormatReader(), BarcodeFormat.QR_CODE) 35 | this.addTest(36, 36, 0.0) 36 | this.addTest(35, 35, 90.0) 37 | this.addTest(35, 35, 180.0) 38 | this.addTest(35, 35, 270.0) 39 | } 40 | 41 | } 42 | 43 | describe("QRCodeBlackBox4TestCase", () => { 44 | it("testBlackBox", (done) => { 45 | const test = new QRCodeBlackBox4TestCase() 46 | test.testBlackBox(() => { 47 | done() 48 | }) 49 | }) 50 | }) -------------------------------------------------------------------------------- /src/test/core/qrcode/QRCodeBlackBox5TestCase.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009 ZXing authors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License") 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | /*package com.google.zxing.qrcode;*/ 18 | 19 | import 'mocha' 20 | import * as assert from 'assert' 21 | 22 | import BarcodeFormat from './../../../core/BarcodeFormat' 23 | import MultiFormatReader from './../../../core/MultiFormatReader' 24 | import AbstractBlackBoxTestCase from './../common/AbstractBlackBoxTestCase' 25 | 26 | /** 27 | * Some very difficult exposure conditions including self-shadowing, which happens a lot when 28 | * pointing down at a barcode (i.e. the phone's shadow falls across part of the image). 29 | * The global histogram gets about 5/15, where the local one gets 15/15. 30 | * 31 | * @author dswitkin@google.com (Daniel Switkin) 32 | */ 33 | export default class QRCodeBlackBox5TestCase extends AbstractBlackBoxTestCase { 34 | 35 | public constructor() { 36 | super("src/test/core/resources/blackbox/qrcode-5", new MultiFormatReader(), BarcodeFormat.QR_CODE) 37 | this.addTest(19, 19, 0.0) 38 | this.addTest(19, 19, 90.0) 39 | this.addTest(19, 19, 180.0) 40 | this.addTest(18, 18, 270.0) 41 | } 42 | 43 | } 44 | 45 | describe("QRCodeBlackBox5TestCase", () => { 46 | it("testBlackBox", (done) => { 47 | const test = new QRCodeBlackBox5TestCase() 48 | test.testBlackBox(() => { 49 | done() 50 | }) 51 | }) 52 | }) -------------------------------------------------------------------------------- /src/test/core/qrcode/QRCodeBlackBox6TestCase.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009 ZXing authors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License") 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | /*package com.google.zxing.qrcode;*/ 18 | 19 | import 'mocha' 20 | import * as assert from 'assert' 21 | 22 | import BarcodeFormat from './../../../core/BarcodeFormat' 23 | import MultiFormatReader from './../../../core/MultiFormatReader' 24 | import AbstractBlackBoxTestCase from './../common/AbstractBlackBoxTestCase' 25 | 26 | /** 27 | * These tests are supplied by Tim Gernat and test finder pattern detection at small size and under 28 | * rotation, which was a weak spot. 29 | */ 30 | export default class QRCodeBlackBox6TestCase extends AbstractBlackBoxTestCase { 31 | 32 | public constructor() { 33 | super("src/test/core/resources/blackbox/qrcode-6", new MultiFormatReader(), BarcodeFormat.QR_CODE) 34 | this.addTest(15, 15, 0.0) 35 | this.addTest(14, 14, 90.0) 36 | this.addTest(12, 13, 180.0) 37 | this.addTest(14, 14, 270.0) 38 | } 39 | 40 | } 41 | 42 | describe("QRCodeBlackBox6TestCase", () => { 43 | it("testBlackBox", (done) => { 44 | const test = new QRCodeBlackBox6TestCase() 45 | test.testBlackBox(() => { 46 | done() 47 | }) 48 | }) 49 | }) -------------------------------------------------------------------------------- /src/test/core/qrcode/QRCodeBlackBox7TestCase.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009 ZXing authors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License") 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | /*package com.google.zxing.qrcode;*/ 18 | 19 | import 'mocha' 20 | import * as assert from 'assert' 21 | 22 | import BarcodeFormat from './../../../core/BarcodeFormat' 23 | import MultiFormatReader from './../../../core/MultiFormatReader' 24 | import AbstractBlackBoxTestCase from './../common/AbstractBlackBoxTestCase' 25 | 26 | /** 27 | * These tests are supplied by Tim Gernat and test finder pattern detection at small size and under 28 | * rotation, which was a weak spot. 29 | */ 30 | export default class QRCodeBlackBox7TestCase extends AbstractBlackBoxTestCase { 31 | 32 | public constructor() { 33 | super("src/test/core/resources/blackbox/qrcode-7", new MultiFormatReader(), BarcodeFormat.QR_CODE) 34 | this.addTest(4, 4, 0.0) 35 | this.addTest(4, 4, 90.0) 36 | this.addTest(4, 4, 180.0) 37 | this.addTest(4, 4, 270.0) 38 | } 39 | 40 | } 41 | 42 | describe("QRCodeBlackBox7TestCase", () => { 43 | it("testBlackBox", (done) => { 44 | const test = new QRCodeBlackBox7TestCase() 45 | test.testBlackBox(() => { 46 | done() 47 | }) 48 | }) 49 | }) 50 | -------------------------------------------------------------------------------- /src/test/core/qrcode/decoder/ErrorCorrectionLevelTestCase.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008 ZXing authors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License") 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | /*package com.google.zxing.qrcode.decoder;*/ 18 | 19 | import 'mocha' 20 | import * as assert from 'assert' 21 | 22 | import ErrorCorrectionLevel from './../../../../core/qrcode/decoder/ErrorCorrectionLevel' 23 | 24 | /** 25 | * @author Sean Owen 26 | */ 27 | describe("ErrorCorrectionLevelTestCase", () => { 28 | 29 | it("testForBits", () => { 30 | assert.strictEqual(ErrorCorrectionLevel.M.equals(ErrorCorrectionLevel.forBits(0)), true) 31 | assert.strictEqual(ErrorCorrectionLevel.L.equals(ErrorCorrectionLevel.forBits(1)), true) 32 | assert.strictEqual(ErrorCorrectionLevel.H.equals(ErrorCorrectionLevel.forBits(2)), true) 33 | assert.strictEqual(ErrorCorrectionLevel.Q.equals(ErrorCorrectionLevel.forBits(3)), true) 34 | try { 35 | ErrorCorrectionLevel.forBits(4); 36 | assert.ok(false, "Should have thrown an exception") 37 | } catch (iae/*IllegalArgumentException */) { 38 | // good 39 | } 40 | }) 41 | 42 | 43 | }) -------------------------------------------------------------------------------- /src/test/core/qrcode/decoder/ModeTestCase.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008 ZXing authors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License") 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | /*package com.google.zxing.qrcode.decoder;*/ 18 | 19 | import 'mocha' 20 | import * as assert from 'assert' 21 | 22 | import Version from './../../../../core/qrcode/decoder/Version' 23 | import Mode from './../../../../core/qrcode/decoder/Mode' 24 | 25 | /** 26 | * @author Sean Owen 27 | */ 28 | describe("ModeTestCase", () => { 29 | 30 | it("testForBits", () => { 31 | assert.strictEqual(Mode.TERMINATOR.equals(Mode.forBits(0x00)), true); 32 | assert.strictEqual(Mode.NUMERIC.equals(Mode.forBits(0x01)), true); 33 | assert.strictEqual(Mode.ALPHANUMERIC.equals(Mode.forBits(0x02)), true); 34 | assert.strictEqual(Mode.BYTE.equals(Mode.forBits(0x04)), true); 35 | assert.strictEqual(Mode.KANJI.equals(Mode.forBits(0x08)), true); 36 | try { 37 | Mode.forBits(0x10); 38 | assert.ok(false, "Should have thrown an exception") 39 | } catch (iae/*IllegalArgumentException*/) { 40 | // good 41 | } 42 | }) 43 | 44 | it("testCharacterCount", () => { 45 | // Spot check a few values 46 | assert.strictEqual(Mode.NUMERIC.getCharacterCountBits(Version.getVersionForNumber(5)), 10) 47 | assert.strictEqual(Mode.NUMERIC.getCharacterCountBits(Version.getVersionForNumber(26)), 12) 48 | assert.strictEqual(Mode.NUMERIC.getCharacterCountBits(Version.getVersionForNumber(40)), 14) 49 | assert.strictEqual(Mode.ALPHANUMERIC.getCharacterCountBits(Version.getVersionForNumber(6)), 9) 50 | assert.strictEqual(Mode.BYTE.getCharacterCountBits(Version.getVersionForNumber(7)), 8) 51 | assert.strictEqual(Mode.KANJI.getCharacterCountBits(Version.getVersionForNumber(8)), 8) 52 | }) 53 | 54 | }) -------------------------------------------------------------------------------- /src/test/core/qrcode/decoder/VersionTestCase.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008 ZXing authors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License") 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | /*package com.google.zxing.qrcode.decoder;*/ 18 | 19 | import 'mocha' 20 | import * as assert from 'assert' 21 | 22 | import ErrorCorrectionLevel from './../../../../core/qrcode/decoder/ErrorCorrectionLevel' 23 | import Version from './../../../../core/qrcode/decoder/Version' 24 | 25 | /** 26 | * @author Sean Owen 27 | */ 28 | describe("VersionTestCase", () => { 29 | 30 | it("testVersionForNumber", () => { 31 | try { 32 | Version.getVersionForNumber(0) 33 | assert.ok(false, "Should have thrown an exception") 34 | } catch (iae/*IllegalArgumentException */) { 35 | // good 36 | } 37 | for (let i: number /*int*/ = 1; i <= 40; i++) { 38 | checkVersion(Version.getVersionForNumber(i), i, 4*i + 17) 39 | } 40 | }) 41 | 42 | function checkVersion(version: Version, number: number /*int*/, dimension: number /*int*/): void { 43 | assert.strictEqual(null !== version, true) 44 | assert.strictEqual(version.getVersionNumber(), number) 45 | assert.strictEqual(null !== version.getAlignmentPatternCenters(), true) 46 | if (number > 1) { 47 | assert.strictEqual(version.getAlignmentPatternCenters().length > 0, true) 48 | } 49 | assert.strictEqual(version.getDimensionForVersion(), dimension) 50 | assert.strictEqual(null !== version.getECBlocksForLevel(ErrorCorrectionLevel.H), true) 51 | assert.strictEqual(null !== version.getECBlocksForLevel(ErrorCorrectionLevel.L), true) 52 | assert.strictEqual(null !== version.getECBlocksForLevel(ErrorCorrectionLevel.M), true) 53 | assert.strictEqual(null !== version.getECBlocksForLevel(ErrorCorrectionLevel.Q), true) 54 | assert.strictEqual(null !== version.buildFunctionPattern(), true) 55 | } 56 | 57 | it("testGetProvisionalVersionForDimension", () => { 58 | for (let i: number /*int*/ = 1; i <= 40; i++) { 59 | assert.strictEqual(Version.getProvisionalVersionForDimension(4*i + 17).getVersionNumber(), i) 60 | } 61 | }) 62 | 63 | it("testDecodeVersionInformation", () => { 64 | // Spot check 65 | doTestVersion(7, 0x07C94); 66 | doTestVersion(12, 0x0C762); 67 | doTestVersion(17, 0x1145D); 68 | doTestVersion(22, 0x168C9); 69 | doTestVersion(27, 0x1B08E); 70 | doTestVersion(32, 0x209D5); 71 | }) 72 | 73 | function doTestVersion(expectedVersion: number /*int*/, mask: number /*int*/): void { 74 | const version: Version = Version.decodeVersionInformation(mask) 75 | assert.strictEqual(null !== version, true) 76 | assert.strictEqual(version.getVersionNumber(), expectedVersion) 77 | } 78 | 79 | }) -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/common/simple.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aleris/zxing-typescript/ffd55027784de89822bc31e989815ea69258c780/src/test/core/resources/blackbox/common/simple.png -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-1/1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aleris/zxing-typescript/ffd55027784de89822bc31e989815ea69258c780/src/test/core/resources/blackbox/qrcode-1/1.png -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-1/1.txt: -------------------------------------------------------------------------------- 1 | MEBKM:URL:http\://en.wikipedia.org/wiki/Main_Page;; -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-1/10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aleris/zxing-typescript/ffd55027784de89822bc31e989815ea69258c780/src/test/core/resources/blackbox/qrcode-1/10.png -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-1/10.txt: -------------------------------------------------------------------------------- 1 | MEBKM:URL:http\://en.wikipedia.org/wiki/Main_Page;; -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-1/11.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aleris/zxing-typescript/ffd55027784de89822bc31e989815ea69258c780/src/test/core/resources/blackbox/qrcode-1/11.png -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-1/11.txt: -------------------------------------------------------------------------------- 1 | MEBKM:URL:http\://en.wikipedia.org/wiki/Main_Page;; -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-1/12.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aleris/zxing-typescript/ffd55027784de89822bc31e989815ea69258c780/src/test/core/resources/blackbox/qrcode-1/12.png -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-1/12.txt: -------------------------------------------------------------------------------- 1 | MEBKM:URL:http\://en.wikipedia.org/wiki/Main_Page;; -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-1/13.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aleris/zxing-typescript/ffd55027784de89822bc31e989815ea69258c780/src/test/core/resources/blackbox/qrcode-1/13.png -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-1/13.txt: -------------------------------------------------------------------------------- 1 | http://google.com/gwt/n?u=bluenile.com -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-1/14.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aleris/zxing-typescript/ffd55027784de89822bc31e989815ea69258c780/src/test/core/resources/blackbox/qrcode-1/14.png -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-1/14.txt: -------------------------------------------------------------------------------- 1 | http://google.com/gwt/n?u=bluenile.com -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-1/15.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aleris/zxing-typescript/ffd55027784de89822bc31e989815ea69258c780/src/test/core/resources/blackbox/qrcode-1/15.png -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-1/15.txt: -------------------------------------------------------------------------------- 1 | http://google.com/gwt/n?u=bluenile.com -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-1/16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aleris/zxing-typescript/ffd55027784de89822bc31e989815ea69258c780/src/test/core/resources/blackbox/qrcode-1/16.png -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-1/16.txt: -------------------------------------------------------------------------------- 1 | Sean Owen 2 | srowen@google.com 3 | 917-364-2918 4 | http://awesome-thoughts.com -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-1/17.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aleris/zxing-typescript/ffd55027784de89822bc31e989815ea69258c780/src/test/core/resources/blackbox/qrcode-1/17.png -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-1/17.txt: -------------------------------------------------------------------------------- 1 | Sean Owen 2 | srowen@google.com 3 | 917-364-2918 4 | http://awesome-thoughts.com -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-1/18.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aleris/zxing-typescript/ffd55027784de89822bc31e989815ea69258c780/src/test/core/resources/blackbox/qrcode-1/18.png -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-1/18.txt: -------------------------------------------------------------------------------- 1 | Sean Owen 2 | srowen@google.com 3 | 917-364-2918 4 | http://awesome-thoughts.com -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-1/19.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aleris/zxing-typescript/ffd55027784de89822bc31e989815ea69258c780/src/test/core/resources/blackbox/qrcode-1/19.png -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-1/19.txt: -------------------------------------------------------------------------------- 1 | Sean Owen 2 | srowen@google.com 3 | 917-364-2918 4 | http://awesome-thoughts.com -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-1/1_b.png1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aleris/zxing-typescript/ffd55027784de89822bc31e989815ea69258c780/src/test/core/resources/blackbox/qrcode-1/1_b.png1 -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-1/2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aleris/zxing-typescript/ffd55027784de89822bc31e989815ea69258c780/src/test/core/resources/blackbox/qrcode-1/2.png -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-1/2.txt: -------------------------------------------------------------------------------- 1 | MEBKM:URL:http\://en.wikipedia.org/wiki/Main_Page;; -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-1/20.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aleris/zxing-typescript/ffd55027784de89822bc31e989815ea69258c780/src/test/core/resources/blackbox/qrcode-1/20.png -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-1/20.txt: -------------------------------------------------------------------------------- 1 | Sean Owen 2 | srowen@google.com 3 | 917-364-2918 4 | http://awesome-thoughts.com -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-1/3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aleris/zxing-typescript/ffd55027784de89822bc31e989815ea69258c780/src/test/core/resources/blackbox/qrcode-1/3.png -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-1/3.txt: -------------------------------------------------------------------------------- 1 | MEBKM:URL:http\://en.wikipedia.org/wiki/Main_Page;; -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-1/4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aleris/zxing-typescript/ffd55027784de89822bc31e989815ea69258c780/src/test/core/resources/blackbox/qrcode-1/4.png -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-1/4.txt: -------------------------------------------------------------------------------- 1 | MEBKM:URL:http\://en.wikipedia.org/wiki/Main_Page;; -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-1/5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aleris/zxing-typescript/ffd55027784de89822bc31e989815ea69258c780/src/test/core/resources/blackbox/qrcode-1/5.png -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-1/5.txt: -------------------------------------------------------------------------------- 1 | MEBKM:URL:http\://en.wikipedia.org/wiki/Main_Page;; -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-1/6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aleris/zxing-typescript/ffd55027784de89822bc31e989815ea69258c780/src/test/core/resources/blackbox/qrcode-1/6.png -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-1/6.txt: -------------------------------------------------------------------------------- 1 | MEBKM:URL:http\://en.wikipedia.org/wiki/Main_Page;; -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-1/7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aleris/zxing-typescript/ffd55027784de89822bc31e989815ea69258c780/src/test/core/resources/blackbox/qrcode-1/7.png -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-1/7.txt: -------------------------------------------------------------------------------- 1 | MEBKM:URL:http\://en.wikipedia.org/wiki/Main_Page;; -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-1/8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aleris/zxing-typescript/ffd55027784de89822bc31e989815ea69258c780/src/test/core/resources/blackbox/qrcode-1/8.png -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-1/8.txt: -------------------------------------------------------------------------------- 1 | MEBKM:URL:http\://en.wikipedia.org/wiki/Main_Page;; -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-1/9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aleris/zxing-typescript/ffd55027784de89822bc31e989815ea69258c780/src/test/core/resources/blackbox/qrcode-1/9.png -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-1/9.txt: -------------------------------------------------------------------------------- 1 | MEBKM:URL:http\://en.wikipedia.org/wiki/Main_Page;; -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-2/1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aleris/zxing-typescript/ffd55027784de89822bc31e989815ea69258c780/src/test/core/resources/blackbox/qrcode-2/1.png -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-2/1.txt: -------------------------------------------------------------------------------- 1 | When we at WRT talk about \"text,\" we are generally talking about a particular kind of readable information encoding - and readable is a complex proposition. Text may be stylized in a way we are unfamiliar with, as in blackletter - it may be interspersed with some markup we don\'t understand, such as HTML - it may be be a substitution system we aren\'t familiar with, such as braille or morse code - or it may be a system that, while technically human-readable, isn\'t particularly optimized for reading by humans, as with barcodes (although barcodes can be read). -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-2/10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aleris/zxing-typescript/ffd55027784de89822bc31e989815ea69258c780/src/test/core/resources/blackbox/qrcode-2/10.png -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-2/10.txt: -------------------------------------------------------------------------------- 1 | Google モバイル 2 | http://google.jp -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-2/11.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aleris/zxing-typescript/ffd55027784de89822bc31e989815ea69258c780/src/test/core/resources/blackbox/qrcode-2/11.png -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-2/11.txt: -------------------------------------------------------------------------------- 1 | BEGIN:VCARD 2 | N:Kennedy;Steve 3 | TEL:+44 (0)7775 755503 4 | ADR;HOME:;;Flat 2, 43 Howitt Road, Belsize Park;London;;NW34LU;UK 5 | ORG:NetTek Ltd; 6 | TITLE:Consultant 7 | EMAIL:steve@nettek.co.uk 8 | URL:www.nettek.co.uk 9 | EMAIL;IM:MSN:steve@gbnet.net 10 | NOTE:Testing 1 2 3 11 | BDAY:19611105 12 | END:VCARD -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-2/12.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aleris/zxing-typescript/ffd55027784de89822bc31e989815ea69258c780/src/test/core/resources/blackbox/qrcode-2/12.png -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-2/12.txt: -------------------------------------------------------------------------------- 1 | The 2005 USGS aerial photography of the Washington Monument is censored. -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-2/13.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aleris/zxing-typescript/ffd55027784de89822bc31e989815ea69258c780/src/test/core/resources/blackbox/qrcode-2/13.png -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-2/13.txt: -------------------------------------------------------------------------------- 1 | The 2005 USGS aerial photograph of the Washington Monument is censored. -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-2/14.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aleris/zxing-typescript/ffd55027784de89822bc31e989815ea69258c780/src/test/core/resources/blackbox/qrcode-2/14.png -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-2/14.txt: -------------------------------------------------------------------------------- 1 | http://bbc.co.uk/programmes -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-2/15.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aleris/zxing-typescript/ffd55027784de89822bc31e989815ea69258c780/src/test/core/resources/blackbox/qrcode-2/15.png -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-2/15.txt: -------------------------------------------------------------------------------- 1 | In 25 words or less in the comments, below, tell us how QR codes will make the world less ordinary. -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-2/16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aleris/zxing-typescript/ffd55027784de89822bc31e989815ea69258c780/src/test/core/resources/blackbox/qrcode-2/16.png -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-2/16.txt: -------------------------------------------------------------------------------- 1 | [外側QRコード] 2 | 3 | *ダブルQR* 4 | http://d-qr.net/ex/ -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-2/17.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aleris/zxing-typescript/ffd55027784de89822bc31e989815ea69258c780/src/test/core/resources/blackbox/qrcode-2/17.png -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-2/17.txt: -------------------------------------------------------------------------------- 1 | デザインQR 2 | http://d-qr.net/ex/ -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-2/18.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aleris/zxing-typescript/ffd55027784de89822bc31e989815ea69258c780/src/test/core/resources/blackbox/qrcode-2/18.png -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-2/18.txt: -------------------------------------------------------------------------------- 1 | *デザインQR* 2 | http://d-qr.net/ex/ -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-2/19.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aleris/zxing-typescript/ffd55027784de89822bc31e989815ea69258c780/src/test/core/resources/blackbox/qrcode-2/19.png -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-2/19.txt: -------------------------------------------------------------------------------- 1 | *デザインQR* 2 | http://d-qr.net/ex/ -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-2/2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aleris/zxing-typescript/ffd55027784de89822bc31e989815ea69258c780/src/test/core/resources/blackbox/qrcode-2/2.png -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-2/2.txt: -------------------------------------------------------------------------------- 1 | LANDBYASCARC PERCEPTIBLEC EEK,OOZI GITSWAYTHROU AWILDERNESSOFBESUPPOSED,I CANT,ORATL ASTDWARFISH.NO REESOFANYM NITUDEARETOBESOMEMISERA EFRAMEBUIL I GS,TENANTED, U INGSUMMER THEFUGITIVE;BUTTHEWHO ISLAND,WI H EXCEPTIONOFT W STERNPOI ,ANDALINEOFLLIAMLEGR .HEWASOF N ENTHUGUENOTF Y ANDHADON BEENWEALTHTIONCONSE ENTUPONH SD STERS,HELEFTNE LE NS,THEC OFHISFOREOUTHCARO A.THISISLA AVERYSINGULARO TCONSISTSO ITTLEELSEDSAQUART FAMILE. TI PARATEDFROMTHEMA AN BYASCAR YPERCEPTERESORT MARSH EN EVEGETATION,ASMIGH SU POSED, CANT,ORATREMITY, ORT OULTRIESTANDS,ANDWHEREARESOM MIS FRAMEBUIFEVER,MAYBE INDEED, TO;BUTT EISLAND,WITNYYEARSAGO,IC ACTED LLIAM AND.HEWASOFANNESHADREDUCEDHIM OWA IONC NSEQUENTUPONHISDSIDENCEATSULLIVA \'S HC ROLINA.THISISLANOUTTHR LESLON . THATN OINTE U RTEROF E.ITISTHROU ERNE DSANDSLI ,AFAVOR TOFT HEN.T -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-2/20.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aleris/zxing-typescript/ffd55027784de89822bc31e989815ea69258c780/src/test/core/resources/blackbox/qrcode-2/20.png -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-2/20.txt: -------------------------------------------------------------------------------- 1 | *デザインQR* 2 | http://d-qr.net/ex/ -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-2/21.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aleris/zxing-typescript/ffd55027784de89822bc31e989815ea69258c780/src/test/core/resources/blackbox/qrcode-2/21.png -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-2/21.txt: -------------------------------------------------------------------------------- 1 | *デザインQR* 2 | http://d-qr.net/ex/ -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-2/22.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aleris/zxing-typescript/ffd55027784de89822bc31e989815ea69258c780/src/test/core/resources/blackbox/qrcode-2/22.png -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-2/22.txt: -------------------------------------------------------------------------------- 1 | http://www.hotpepper.jp/mobile/cgi-bin/MBLC80100.cgi?SA=00&Z=AG&vos=hpp064&uid=NULLGWDOCOMO -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-2/23.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aleris/zxing-typescript/ffd55027784de89822bc31e989815ea69258c780/src/test/core/resources/blackbox/qrcode-2/23.png -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-2/23.txt: -------------------------------------------------------------------------------- 1 | http://aniful.jp/pr/ -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-2/24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aleris/zxing-typescript/ffd55027784de89822bc31e989815ea69258c780/src/test/core/resources/blackbox/qrcode-2/24.png -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-2/24.txt: -------------------------------------------------------------------------------- 1 | *デザインQR* 2 | http://d-qr.net/ex/ -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-2/25.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aleris/zxing-typescript/ffd55027784de89822bc31e989815ea69258c780/src/test/core/resources/blackbox/qrcode-2/25.png -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-2/25.txt: -------------------------------------------------------------------------------- 1 | MEBKM:TITLE:;URL:http://d.kaywa.com/2020400102;; -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-2/26.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aleris/zxing-typescript/ffd55027784de89822bc31e989815ea69258c780/src/test/core/resources/blackbox/qrcode-2/26.png -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-2/26.txt: -------------------------------------------------------------------------------- 1 | <デザインQR> 2 | イラスト入りカラーQRコード 3 | http://d-qr.net/ex/ -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-2/27.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aleris/zxing-typescript/ffd55027784de89822bc31e989815ea69258c780/src/test/core/resources/blackbox/qrcode-2/27.png -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-2/27.txt: -------------------------------------------------------------------------------- 1 | *デザインQR* 2 | http://d-qr.net/ex/ -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-2/28.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aleris/zxing-typescript/ffd55027784de89822bc31e989815ea69258c780/src/test/core/resources/blackbox/qrcode-2/28.png -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-2/28.txt: -------------------------------------------------------------------------------- 1 | http://www.webtech.co.jp/k/ -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-2/29.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aleris/zxing-typescript/ffd55027784de89822bc31e989815ea69258c780/src/test/core/resources/blackbox/qrcode-2/29.png -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-2/29.txt: -------------------------------------------------------------------------------- 1 | http://live.fdgm.jp/u/event/hype/hype_top.html 2 | 3 | MEBKM:TITLE:hypeモバイル;URL:http\://live.fdgm.jp/u/event/hype/hype_top.html;; -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-2/30.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aleris/zxing-typescript/ffd55027784de89822bc31e989815ea69258c780/src/test/core/resources/blackbox/qrcode-2/30.png -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-2/30.txt: -------------------------------------------------------------------------------- 1 | MECARD:N:測試;; -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-2/31.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aleris/zxing-typescript/ffd55027784de89822bc31e989815ea69258c780/src/test/core/resources/blackbox/qrcode-2/31.png -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-2/31.txt: -------------------------------------------------------------------------------- 1 | 今度のバージョンでは文章の暗号化ができます。 -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-2/32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aleris/zxing-typescript/ffd55027784de89822bc31e989815ea69258c780/src/test/core/resources/blackbox/qrcode-2/32.png -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-2/32.txt: -------------------------------------------------------------------------------- 1 | BEGIN:VCARD 2 | N:Kennedy;Steve 3 | TEL:+44 (0)7775 755503 4 | ADR;HOME:;;Flat 2, 43 Howitt Road, Belsize Park;London;;NW34LU;UK 5 | ORG:NetTek Ltd; 6 | TITLE:Consultant 7 | EMAIL:steve@nettek.co.uk 8 | URL:www.nettek.co.uk 9 | EMAIL;IM:MSN:steve@gbnet.net 10 | NOTE:Testing 1 2 3 11 | BDAY:19611105 12 | END:VCARD -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-2/33.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aleris/zxing-typescript/ffd55027784de89822bc31e989815ea69258c780/src/test/core/resources/blackbox/qrcode-2/33.png -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-2/33.txt: -------------------------------------------------------------------------------- 1 | AD:SUB:阿;; -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-2/34.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aleris/zxing-typescript/ffd55027784de89822bc31e989815ea69258c780/src/test/core/resources/blackbox/qrcode-2/34.png -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-2/34.txt: -------------------------------------------------------------------------------- 1 | http://www.google.com/ -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-2/35.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aleris/zxing-typescript/ffd55027784de89822bc31e989815ea69258c780/src/test/core/resources/blackbox/qrcode-2/35.png -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-2/35.txt: -------------------------------------------------------------------------------- 1 | http://www.google.com/ -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-2/4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aleris/zxing-typescript/ffd55027784de89822bc31e989815ea69258c780/src/test/core/resources/blackbox/qrcode-2/4.png -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-2/4.txt: -------------------------------------------------------------------------------- 1 | http://wwws.keihin.ktr.mlit.go.jp/keitai/ -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-2/5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aleris/zxing-typescript/ffd55027784de89822bc31e989815ea69258c780/src/test/core/resources/blackbox/qrcode-2/5.png -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-2/5.txt: -------------------------------------------------------------------------------- 1 | 2021200000 -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-2/6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aleris/zxing-typescript/ffd55027784de89822bc31e989815ea69258c780/src/test/core/resources/blackbox/qrcode-2/6.png -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-2/6.txt: -------------------------------------------------------------------------------- 1 | http://d.kaywa.com/20207100 -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-2/7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aleris/zxing-typescript/ffd55027784de89822bc31e989815ea69258c780/src/test/core/resources/blackbox/qrcode-2/7.png -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-2/7.txt: -------------------------------------------------------------------------------- 1 | BIZCARD:N:Todd;X:Ogasawara;T:Tech Geek;C:MobileViews.com;A:MobileTown USA;E:editor@mobileviews.com;; -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-2/8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aleris/zxing-typescript/ffd55027784de89822bc31e989815ea69258c780/src/test/core/resources/blackbox/qrcode-2/8.png -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-2/8.txt: -------------------------------------------------------------------------------- 1 | http://staticrooster.com -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-2/9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aleris/zxing-typescript/ffd55027784de89822bc31e989815ea69258c780/src/test/core/resources/blackbox/qrcode-2/9.png -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-2/9.txt: -------------------------------------------------------------------------------- 1 | Morden -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-3/01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aleris/zxing-typescript/ffd55027784de89822bc31e989815ea69258c780/src/test/core/resources/blackbox/qrcode-3/01.png -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-3/01.txt: -------------------------------------------------------------------------------- 1 | http://arnaud.sahuguet.com/graffiti/test.php?ll=-74.00309961503218,40.74102573163046,0 -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-3/02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aleris/zxing-typescript/ffd55027784de89822bc31e989815ea69258c780/src/test/core/resources/blackbox/qrcode-3/02.png -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-3/02.txt: -------------------------------------------------------------------------------- 1 | http://arnaud.sahuguet.com/graffiti/test.php?ll=-74.00309961503218,40.74102573163046,0 -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-3/03.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aleris/zxing-typescript/ffd55027784de89822bc31e989815ea69258c780/src/test/core/resources/blackbox/qrcode-3/03.png -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-3/03.txt: -------------------------------------------------------------------------------- 1 | http://arnaud.sahuguet.com/graffiti/test.php?ll=-74.00309961503218,40.74102573163046,0 -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-3/04.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aleris/zxing-typescript/ffd55027784de89822bc31e989815ea69258c780/src/test/core/resources/blackbox/qrcode-3/04.png -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-3/04.txt: -------------------------------------------------------------------------------- 1 | http://arnaud.sahuguet.com/graffiti/test.php?ll=-74.00309961503218,40.74102573163046,0 -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-3/05.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aleris/zxing-typescript/ffd55027784de89822bc31e989815ea69258c780/src/test/core/resources/blackbox/qrcode-3/05.png -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-3/05.txt: -------------------------------------------------------------------------------- 1 | http://arnaud.sahuguet.com/graffiti/test.php?ll=-74.00309961503218,40.74102573163046,0 -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-3/06.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aleris/zxing-typescript/ffd55027784de89822bc31e989815ea69258c780/src/test/core/resources/blackbox/qrcode-3/06.png -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-3/06.txt: -------------------------------------------------------------------------------- 1 | http://arnaud.sahuguet.com/graffiti/test.php?ll=-74.00309961503218,40.74102573163046,0 -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-3/07.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aleris/zxing-typescript/ffd55027784de89822bc31e989815ea69258c780/src/test/core/resources/blackbox/qrcode-3/07.png -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-3/07.txt: -------------------------------------------------------------------------------- 1 | http://arnaud.sahuguet.com/graffiti/test.php?ll=-74.00309961503218,40.74102573163046,0 -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-3/08.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aleris/zxing-typescript/ffd55027784de89822bc31e989815ea69258c780/src/test/core/resources/blackbox/qrcode-3/08.png -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-3/08.txt: -------------------------------------------------------------------------------- 1 | http://arnaud.sahuguet.com/graffiti/test.php?ll=-74.00309961503218,40.74102573163046,0 -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-3/09.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aleris/zxing-typescript/ffd55027784de89822bc31e989815ea69258c780/src/test/core/resources/blackbox/qrcode-3/09.png -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-3/09.txt: -------------------------------------------------------------------------------- 1 | http://arnaud.sahuguet.com/graffiti/test.php?ll=-74.00309961503218,40.74102573163046,0 -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-3/10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aleris/zxing-typescript/ffd55027784de89822bc31e989815ea69258c780/src/test/core/resources/blackbox/qrcode-3/10.png -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-3/10.txt: -------------------------------------------------------------------------------- 1 | MECARD:N:Google 411,;TEL:18665881077;; -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-3/11.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aleris/zxing-typescript/ffd55027784de89822bc31e989815ea69258c780/src/test/core/resources/blackbox/qrcode-3/11.png -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-3/11.txt: -------------------------------------------------------------------------------- 1 | MECARD:N:Google 411,;TEL:18665881077;; -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-3/12.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aleris/zxing-typescript/ffd55027784de89822bc31e989815ea69258c780/src/test/core/resources/blackbox/qrcode-3/12.png -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-3/12.txt: -------------------------------------------------------------------------------- 1 | MECARD:N:Google 411,;TEL:18665881077;; -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-3/13.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aleris/zxing-typescript/ffd55027784de89822bc31e989815ea69258c780/src/test/core/resources/blackbox/qrcode-3/13.png -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-3/13.txt: -------------------------------------------------------------------------------- 1 | MECARD:N:Google 411,;TEL:18665881077;; -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-3/14.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aleris/zxing-typescript/ffd55027784de89822bc31e989815ea69258c780/src/test/core/resources/blackbox/qrcode-3/14.png -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-3/14.txt: -------------------------------------------------------------------------------- 1 | MECARD:N:Google 411,;TEL:18665881077;; -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-3/15.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aleris/zxing-typescript/ffd55027784de89822bc31e989815ea69258c780/src/test/core/resources/blackbox/qrcode-3/15.png -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-3/15.txt: -------------------------------------------------------------------------------- 1 | MECARD:N:Google 411,;TEL:18665881077;; -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-3/16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aleris/zxing-typescript/ffd55027784de89822bc31e989815ea69258c780/src/test/core/resources/blackbox/qrcode-3/16.png -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-3/16.txt: -------------------------------------------------------------------------------- 1 | MECARD:N:Google 411,;TEL:18665881077;; -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-3/17.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aleris/zxing-typescript/ffd55027784de89822bc31e989815ea69258c780/src/test/core/resources/blackbox/qrcode-3/17.png -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-3/17.txt: -------------------------------------------------------------------------------- 1 | MECARD:N:Google 411,;TEL:18665881077;; -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-3/18.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aleris/zxing-typescript/ffd55027784de89822bc31e989815ea69258c780/src/test/core/resources/blackbox/qrcode-3/18.png -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-3/18.txt: -------------------------------------------------------------------------------- 1 | UI office hours signup 2 | http://www.corp.google.com/sparrow/ui_office_hours/ 3 | -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-3/19.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aleris/zxing-typescript/ffd55027784de89822bc31e989815ea69258c780/src/test/core/resources/blackbox/qrcode-3/19.png -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-3/19.txt: -------------------------------------------------------------------------------- 1 | UI office hours signup 2 | http://www.corp.google.com/sparrow/ui_office_hours/ 3 | -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-3/20.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aleris/zxing-typescript/ffd55027784de89822bc31e989815ea69258c780/src/test/core/resources/blackbox/qrcode-3/20.png -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-3/20.txt: -------------------------------------------------------------------------------- 1 | UI office hours signup 2 | http://www.corp.google.com/sparrow/ui_office_hours/ 3 | -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-3/21.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aleris/zxing-typescript/ffd55027784de89822bc31e989815ea69258c780/src/test/core/resources/blackbox/qrcode-3/21.png -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-3/21.txt: -------------------------------------------------------------------------------- 1 | UI office hours signup 2 | http://www.corp.google.com/sparrow/ui_office_hours/ 3 | -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-3/22.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aleris/zxing-typescript/ffd55027784de89822bc31e989815ea69258c780/src/test/core/resources/blackbox/qrcode-3/22.png -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-3/22.txt: -------------------------------------------------------------------------------- 1 | UI office hours signup 2 | http://www.corp.google.com/sparrow/ui_office_hours/ 3 | -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-3/23.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aleris/zxing-typescript/ffd55027784de89822bc31e989815ea69258c780/src/test/core/resources/blackbox/qrcode-3/23.png -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-3/23.txt: -------------------------------------------------------------------------------- 1 | UI office hours signup 2 | http://www.corp.google.com/sparrow/ui_office_hours/ 3 | -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-3/24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aleris/zxing-typescript/ffd55027784de89822bc31e989815ea69258c780/src/test/core/resources/blackbox/qrcode-3/24.png -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-3/24.txt: -------------------------------------------------------------------------------- 1 | UI office hours signup 2 | http://www.corp.google.com/sparrow/ui_office_hours/ 3 | -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-3/25.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aleris/zxing-typescript/ffd55027784de89822bc31e989815ea69258c780/src/test/core/resources/blackbox/qrcode-3/25.png -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-3/25.txt: -------------------------------------------------------------------------------- 1 | UI office hours signup 2 | http://www.corp.google.com/sparrow/ui_office_hours/ 3 | -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-3/26.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aleris/zxing-typescript/ffd55027784de89822bc31e989815ea69258c780/src/test/core/resources/blackbox/qrcode-3/26.png -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-3/26.txt: -------------------------------------------------------------------------------- 1 | MECARD:N:Sean Owen;TEL:+12125658770;EMAIL:srowen@google.com;; -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-3/27.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aleris/zxing-typescript/ffd55027784de89822bc31e989815ea69258c780/src/test/core/resources/blackbox/qrcode-3/27.png -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-3/27.txt: -------------------------------------------------------------------------------- 1 | MECARD:N:Sean Owen;TEL:+12125658770;EMAIL:srowen@google.com;; -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-3/28.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aleris/zxing-typescript/ffd55027784de89822bc31e989815ea69258c780/src/test/core/resources/blackbox/qrcode-3/28.png -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-3/28.txt: -------------------------------------------------------------------------------- 1 | MECARD:N:Sean Owen;TEL:+12125658770;EMAIL:srowen@google.com;; -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-3/29.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aleris/zxing-typescript/ffd55027784de89822bc31e989815ea69258c780/src/test/core/resources/blackbox/qrcode-3/29.png -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-3/29.txt: -------------------------------------------------------------------------------- 1 | MECARD:N:Sean Owen;TEL:+12125658770;EMAIL:srowen@google.com;; -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-3/30.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aleris/zxing-typescript/ffd55027784de89822bc31e989815ea69258c780/src/test/core/resources/blackbox/qrcode-3/30.png -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-3/30.txt: -------------------------------------------------------------------------------- 1 | MECARD:N:Sean Owen;TEL:+12125658770;EMAIL:srowen@google.com;; -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-3/31.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aleris/zxing-typescript/ffd55027784de89822bc31e989815ea69258c780/src/test/core/resources/blackbox/qrcode-3/31.png -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-3/31.txt: -------------------------------------------------------------------------------- 1 | MECARD:N:Sean Owen;TEL:+12125658770;EMAIL:srowen@google.com;; -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-3/32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aleris/zxing-typescript/ffd55027784de89822bc31e989815ea69258c780/src/test/core/resources/blackbox/qrcode-3/32.png -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-3/32.txt: -------------------------------------------------------------------------------- 1 | MECARD:N:Sean Owen;TEL:+12125658770;EMAIL:srowen@google.com;; -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-3/33.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aleris/zxing-typescript/ffd55027784de89822bc31e989815ea69258c780/src/test/core/resources/blackbox/qrcode-3/33.png -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-3/33.txt: -------------------------------------------------------------------------------- 1 | MECARD:N:Sean Owen;TEL:+12125658770;EMAIL:srowen@google.com;; -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-3/34.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aleris/zxing-typescript/ffd55027784de89822bc31e989815ea69258c780/src/test/core/resources/blackbox/qrcode-3/34.png -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-3/34.txt: -------------------------------------------------------------------------------- 1 | MECARD:N:Sean Owen;TEL:+12125658770;EMAIL:srowen@google.com;; -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-3/35.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aleris/zxing-typescript/ffd55027784de89822bc31e989815ea69258c780/src/test/core/resources/blackbox/qrcode-3/35.png -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-3/35.txt: -------------------------------------------------------------------------------- 1 | MECARD:N:Sean Owen;TEL:+12125658770;EMAIL:srowen@google.com;; -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-3/36.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aleris/zxing-typescript/ffd55027784de89822bc31e989815ea69258c780/src/test/core/resources/blackbox/qrcode-3/36.png -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-3/36.txt: -------------------------------------------------------------------------------- 1 | MECARD:N:Sean Owen;TEL:+12125658770;EMAIL:srowen@google.com;; -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-3/37.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aleris/zxing-typescript/ffd55027784de89822bc31e989815ea69258c780/src/test/core/resources/blackbox/qrcode-3/37.png -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-3/37.txt: -------------------------------------------------------------------------------- 1 | MECARD:N:Sean Owen;TEL:+12125658770;EMAIL:srowen@google.com;; -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-3/38.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aleris/zxing-typescript/ffd55027784de89822bc31e989815ea69258c780/src/test/core/resources/blackbox/qrcode-3/38.png -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-3/38.txt: -------------------------------------------------------------------------------- 1 | MECARD:N:Sean Owen;TEL:+12125658770;EMAIL:srowen@google.com;; -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-3/39.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aleris/zxing-typescript/ffd55027784de89822bc31e989815ea69258c780/src/test/core/resources/blackbox/qrcode-3/39.png -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-3/39.txt: -------------------------------------------------------------------------------- 1 | MECARD:N:Sean Owen;TEL:+12125658770;EMAIL:srowen@google.com;; -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-3/40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aleris/zxing-typescript/ffd55027784de89822bc31e989815ea69258c780/src/test/core/resources/blackbox/qrcode-3/40.png -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-3/40.txt: -------------------------------------------------------------------------------- 1 | MECARD:N:Sean Owen;TEL:+12125658770;EMAIL:srowen@google.com;; -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-3/41.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aleris/zxing-typescript/ffd55027784de89822bc31e989815ea69258c780/src/test/core/resources/blackbox/qrcode-3/41.png -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-3/41.txt: -------------------------------------------------------------------------------- 1 | MECARD:N:Sean Owen;TEL:+12125658770;EMAIL:srowen@google.com;; -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-3/42.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aleris/zxing-typescript/ffd55027784de89822bc31e989815ea69258c780/src/test/core/resources/blackbox/qrcode-3/42.png -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-3/42.txt: -------------------------------------------------------------------------------- 1 | MECARD:N:Sean Owen;TEL:+12125658770;EMAIL:srowen@google.com;; -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-4/01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aleris/zxing-typescript/ffd55027784de89822bc31e989815ea69258c780/src/test/core/resources/blackbox/qrcode-4/01.png -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-4/01.txt: -------------------------------------------------------------------------------- 1 | Google Print Ads - T.G.I.A.F. - January 31, 2008 -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-4/02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aleris/zxing-typescript/ffd55027784de89822bc31e989815ea69258c780/src/test/core/resources/blackbox/qrcode-4/02.png -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-4/02.txt: -------------------------------------------------------------------------------- 1 | Google Print Ads - T.G.I.A.F. - January 31, 2008 -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-4/03.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aleris/zxing-typescript/ffd55027784de89822bc31e989815ea69258c780/src/test/core/resources/blackbox/qrcode-4/03.png -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-4/03.txt: -------------------------------------------------------------------------------- 1 | Google Print Ads - T.G.I.A.F. - January 31, 2008 -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-4/04.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aleris/zxing-typescript/ffd55027784de89822bc31e989815ea69258c780/src/test/core/resources/blackbox/qrcode-4/04.png -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-4/04.txt: -------------------------------------------------------------------------------- 1 | Google Print Ads - T.G.I.A.F. - January 31, 2008 -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-4/05.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aleris/zxing-typescript/ffd55027784de89822bc31e989815ea69258c780/src/test/core/resources/blackbox/qrcode-4/05.png -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-4/05.txt: -------------------------------------------------------------------------------- 1 | Google Print Ads - T.G.I.A.F. - January 31, 2008 -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-4/06.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aleris/zxing-typescript/ffd55027784de89822bc31e989815ea69258c780/src/test/core/resources/blackbox/qrcode-4/06.png -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-4/06.txt: -------------------------------------------------------------------------------- 1 | Google Print Ads - T.G.I.A.F. - January 31, 2008 -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-4/07.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aleris/zxing-typescript/ffd55027784de89822bc31e989815ea69258c780/src/test/core/resources/blackbox/qrcode-4/07.png -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-4/07.txt: -------------------------------------------------------------------------------- 1 | Google Print Ads - T.G.I.A.F. - January 31, 2008 -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-4/08.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aleris/zxing-typescript/ffd55027784de89822bc31e989815ea69258c780/src/test/core/resources/blackbox/qrcode-4/08.png -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-4/08.txt: -------------------------------------------------------------------------------- 1 | Google Print Ads - T.G.I.A.F. - January 31, 2008 -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-4/09.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aleris/zxing-typescript/ffd55027784de89822bc31e989815ea69258c780/src/test/core/resources/blackbox/qrcode-4/09.png -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-4/09.txt: -------------------------------------------------------------------------------- 1 | Google Print Ads - T.G.I.A.F. - January 31, 2008 -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-4/10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aleris/zxing-typescript/ffd55027784de89822bc31e989815ea69258c780/src/test/core/resources/blackbox/qrcode-4/10.png -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-4/10.txt: -------------------------------------------------------------------------------- 1 | Google Print Ads - T.G.I.A.F. - January 31, 2008 -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-4/11.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aleris/zxing-typescript/ffd55027784de89822bc31e989815ea69258c780/src/test/core/resources/blackbox/qrcode-4/11.png -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-4/11.txt: -------------------------------------------------------------------------------- 1 | Google Print Ads - T.G.I.A.F. - January 31, 2008 -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-4/12.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aleris/zxing-typescript/ffd55027784de89822bc31e989815ea69258c780/src/test/core/resources/blackbox/qrcode-4/12.png -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-4/12.txt: -------------------------------------------------------------------------------- 1 | Google Print Ads - T.G.I.A.F. - January 31, 2008 -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-4/13.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aleris/zxing-typescript/ffd55027784de89822bc31e989815ea69258c780/src/test/core/resources/blackbox/qrcode-4/13.png -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-4/13.txt: -------------------------------------------------------------------------------- 1 | Google Print Ads - T.G.I.A.F. - January 31, 2008 -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-4/14.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aleris/zxing-typescript/ffd55027784de89822bc31e989815ea69258c780/src/test/core/resources/blackbox/qrcode-4/14.png -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-4/14.txt: -------------------------------------------------------------------------------- 1 | Google Print Ads - T.G.I.A.F. - January 31, 2008 -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-4/15.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aleris/zxing-typescript/ffd55027784de89822bc31e989815ea69258c780/src/test/core/resources/blackbox/qrcode-4/15.png -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-4/15.txt: -------------------------------------------------------------------------------- 1 | http://code.google.com -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-4/16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aleris/zxing-typescript/ffd55027784de89822bc31e989815ea69258c780/src/test/core/resources/blackbox/qrcode-4/16.png -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-4/16.txt: -------------------------------------------------------------------------------- 1 | http://code.google.com -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-4/17.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aleris/zxing-typescript/ffd55027784de89822bc31e989815ea69258c780/src/test/core/resources/blackbox/qrcode-4/17.png -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-4/17.txt: -------------------------------------------------------------------------------- 1 | http://code.google.com -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-4/18.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aleris/zxing-typescript/ffd55027784de89822bc31e989815ea69258c780/src/test/core/resources/blackbox/qrcode-4/18.png -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-4/18.txt: -------------------------------------------------------------------------------- 1 | http://code.google.com -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-4/19.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aleris/zxing-typescript/ffd55027784de89822bc31e989815ea69258c780/src/test/core/resources/blackbox/qrcode-4/19.png -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-4/19.txt: -------------------------------------------------------------------------------- 1 | http://code.google.com -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-4/20.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aleris/zxing-typescript/ffd55027784de89822bc31e989815ea69258c780/src/test/core/resources/blackbox/qrcode-4/20.png -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-4/20.txt: -------------------------------------------------------------------------------- 1 | http://code.google.com -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-4/21.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aleris/zxing-typescript/ffd55027784de89822bc31e989815ea69258c780/src/test/core/resources/blackbox/qrcode-4/21.png -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-4/21.txt: -------------------------------------------------------------------------------- 1 | http://code.google.com -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-4/22.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aleris/zxing-typescript/ffd55027784de89822bc31e989815ea69258c780/src/test/core/resources/blackbox/qrcode-4/22.png -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-4/22.txt: -------------------------------------------------------------------------------- 1 | http://code.google.com -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-4/23.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aleris/zxing-typescript/ffd55027784de89822bc31e989815ea69258c780/src/test/core/resources/blackbox/qrcode-4/23.png -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-4/23.txt: -------------------------------------------------------------------------------- 1 | http://code.google.com -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-4/24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aleris/zxing-typescript/ffd55027784de89822bc31e989815ea69258c780/src/test/core/resources/blackbox/qrcode-4/24.png -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-4/24.txt: -------------------------------------------------------------------------------- 1 | http://code.google.com -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-4/25.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aleris/zxing-typescript/ffd55027784de89822bc31e989815ea69258c780/src/test/core/resources/blackbox/qrcode-4/25.png -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-4/25.txt: -------------------------------------------------------------------------------- 1 | http://code.google.com -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-4/26.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aleris/zxing-typescript/ffd55027784de89822bc31e989815ea69258c780/src/test/core/resources/blackbox/qrcode-4/26.png -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-4/26.txt: -------------------------------------------------------------------------------- 1 | http://code.google.com -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-4/27.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aleris/zxing-typescript/ffd55027784de89822bc31e989815ea69258c780/src/test/core/resources/blackbox/qrcode-4/27.png -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-4/27.txt: -------------------------------------------------------------------------------- 1 | http://code.google.com -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-4/28.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aleris/zxing-typescript/ffd55027784de89822bc31e989815ea69258c780/src/test/core/resources/blackbox/qrcode-4/28.png -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-4/28.txt: -------------------------------------------------------------------------------- 1 | http://code.google.com -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-4/29.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aleris/zxing-typescript/ffd55027784de89822bc31e989815ea69258c780/src/test/core/resources/blackbox/qrcode-4/29.png -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-4/29.txt: -------------------------------------------------------------------------------- 1 | http://code.google.com -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-4/30.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aleris/zxing-typescript/ffd55027784de89822bc31e989815ea69258c780/src/test/core/resources/blackbox/qrcode-4/30.png -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-4/30.txt: -------------------------------------------------------------------------------- 1 | http://code.google.com -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-4/31.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aleris/zxing-typescript/ffd55027784de89822bc31e989815ea69258c780/src/test/core/resources/blackbox/qrcode-4/31.png -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-4/31.txt: -------------------------------------------------------------------------------- 1 | http://code.google.com -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-4/32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aleris/zxing-typescript/ffd55027784de89822bc31e989815ea69258c780/src/test/core/resources/blackbox/qrcode-4/32.png -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-4/32.txt: -------------------------------------------------------------------------------- 1 | http://code.google.com -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-4/33.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aleris/zxing-typescript/ffd55027784de89822bc31e989815ea69258c780/src/test/core/resources/blackbox/qrcode-4/33.png -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-4/33.txt: -------------------------------------------------------------------------------- 1 | http://code.google.com -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-4/34.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aleris/zxing-typescript/ffd55027784de89822bc31e989815ea69258c780/src/test/core/resources/blackbox/qrcode-4/34.png -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-4/34.txt: -------------------------------------------------------------------------------- 1 | http://code.google.com -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-4/35.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aleris/zxing-typescript/ffd55027784de89822bc31e989815ea69258c780/src/test/core/resources/blackbox/qrcode-4/35.png -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-4/35.txt: -------------------------------------------------------------------------------- 1 | http://code.google.com/p/zxing/ -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-4/36.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aleris/zxing-typescript/ffd55027784de89822bc31e989815ea69258c780/src/test/core/resources/blackbox/qrcode-4/36.png -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-4/36.txt: -------------------------------------------------------------------------------- 1 | http://code.google.com/p/zxing/ -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-4/37.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aleris/zxing-typescript/ffd55027784de89822bc31e989815ea69258c780/src/test/core/resources/blackbox/qrcode-4/37.png -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-4/37.txt: -------------------------------------------------------------------------------- 1 | http://code.google.com/p/zxing/ -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-4/38.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aleris/zxing-typescript/ffd55027784de89822bc31e989815ea69258c780/src/test/core/resources/blackbox/qrcode-4/38.png -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-4/38.txt: -------------------------------------------------------------------------------- 1 | http://code.google.com/p/zxing/ -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-4/39.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aleris/zxing-typescript/ffd55027784de89822bc31e989815ea69258c780/src/test/core/resources/blackbox/qrcode-4/39.png -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-4/39.txt: -------------------------------------------------------------------------------- 1 | http://code.google.com/p/zxing/ -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-4/40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aleris/zxing-typescript/ffd55027784de89822bc31e989815ea69258c780/src/test/core/resources/blackbox/qrcode-4/40.png -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-4/40.txt: -------------------------------------------------------------------------------- 1 | http://code.google.com/p/zxing/ -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-4/41.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aleris/zxing-typescript/ffd55027784de89822bc31e989815ea69258c780/src/test/core/resources/blackbox/qrcode-4/41.png -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-4/41.txt: -------------------------------------------------------------------------------- 1 | http://code.google.com/p/zxing/ -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-4/42.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aleris/zxing-typescript/ffd55027784de89822bc31e989815ea69258c780/src/test/core/resources/blackbox/qrcode-4/42.png -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-4/42.txt: -------------------------------------------------------------------------------- 1 | http://code.google.com/p/zxing/ -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-4/43.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aleris/zxing-typescript/ffd55027784de89822bc31e989815ea69258c780/src/test/core/resources/blackbox/qrcode-4/43.png -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-4/43.txt: -------------------------------------------------------------------------------- 1 | http://code.google.com/p/zxing/ -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-4/44.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aleris/zxing-typescript/ffd55027784de89822bc31e989815ea69258c780/src/test/core/resources/blackbox/qrcode-4/44.png -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-4/44.txt: -------------------------------------------------------------------------------- 1 | http://code.google.com/p/zxing/ -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-4/45.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aleris/zxing-typescript/ffd55027784de89822bc31e989815ea69258c780/src/test/core/resources/blackbox/qrcode-4/45.png -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-4/45.txt: -------------------------------------------------------------------------------- 1 | http://code.google.com/p/zxing/ -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-4/46.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aleris/zxing-typescript/ffd55027784de89822bc31e989815ea69258c780/src/test/core/resources/blackbox/qrcode-4/46.png -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-4/46.txt: -------------------------------------------------------------------------------- 1 | http://code.google.com/p/zxing/ -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-4/47.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aleris/zxing-typescript/ffd55027784de89822bc31e989815ea69258c780/src/test/core/resources/blackbox/qrcode-4/47.png -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-4/47.txt: -------------------------------------------------------------------------------- 1 | http://code.google.com/p/zxing/ -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-4/48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aleris/zxing-typescript/ffd55027784de89822bc31e989815ea69258c780/src/test/core/resources/blackbox/qrcode-4/48.png -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-4/48.txt: -------------------------------------------------------------------------------- 1 | http://code.google.com/p/zxing/ -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-5/01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aleris/zxing-typescript/ffd55027784de89822bc31e989815ea69258c780/src/test/core/resources/blackbox/qrcode-5/01.png -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-5/01.txt: -------------------------------------------------------------------------------- 1 | MECARD:N:Sean Owen;TEL:+12125658770;EMAIL:srowen@google.com;; -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-5/02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aleris/zxing-typescript/ffd55027784de89822bc31e989815ea69258c780/src/test/core/resources/blackbox/qrcode-5/02.png -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-5/02.txt: -------------------------------------------------------------------------------- 1 | MECARD:N:Sean Owen;TEL:+12125658770;EMAIL:srowen@google.com;; -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-5/03.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aleris/zxing-typescript/ffd55027784de89822bc31e989815ea69258c780/src/test/core/resources/blackbox/qrcode-5/03.png -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-5/03.txt: -------------------------------------------------------------------------------- 1 | MECARD:N:Sean Owen;TEL:+12125658770;EMAIL:srowen@google.com;; -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-5/04.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aleris/zxing-typescript/ffd55027784de89822bc31e989815ea69258c780/src/test/core/resources/blackbox/qrcode-5/04.png -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-5/04.txt: -------------------------------------------------------------------------------- 1 | MECARD:N:Sean Owen;TEL:+12125658770;EMAIL:srowen@google.com;; -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-5/05.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aleris/zxing-typescript/ffd55027784de89822bc31e989815ea69258c780/src/test/core/resources/blackbox/qrcode-5/05.png -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-5/05.txt: -------------------------------------------------------------------------------- 1 | MECARD:N:Sean Owen;TEL:+12125658770;EMAIL:srowen@google.com;; -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-5/06.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aleris/zxing-typescript/ffd55027784de89822bc31e989815ea69258c780/src/test/core/resources/blackbox/qrcode-5/06.png -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-5/06.txt: -------------------------------------------------------------------------------- 1 | MECARD:N:Sean Owen;TEL:+12125658770;EMAIL:srowen@google.com;; -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-5/07.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aleris/zxing-typescript/ffd55027784de89822bc31e989815ea69258c780/src/test/core/resources/blackbox/qrcode-5/07.png -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-5/07.txt: -------------------------------------------------------------------------------- 1 | MECARD:N:Sean Owen;TEL:+12125658770;EMAIL:srowen@google.com;; -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-5/08.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aleris/zxing-typescript/ffd55027784de89822bc31e989815ea69258c780/src/test/core/resources/blackbox/qrcode-5/08.png -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-5/08.txt: -------------------------------------------------------------------------------- 1 | MECARD:N:Sean Owen;TEL:+12125658770;EMAIL:srowen@google.com;; -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-5/09.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aleris/zxing-typescript/ffd55027784de89822bc31e989815ea69258c780/src/test/core/resources/blackbox/qrcode-5/09.png -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-5/09.txt: -------------------------------------------------------------------------------- 1 | MECARD:N:Sean Owen;TEL:+12125658770;EMAIL:srowen@google.com;; -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-5/10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aleris/zxing-typescript/ffd55027784de89822bc31e989815ea69258c780/src/test/core/resources/blackbox/qrcode-5/10.png -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-5/10.txt: -------------------------------------------------------------------------------- 1 | MECARD:N:Sean Owen;TEL:+12125658770;EMAIL:srowen@google.com;; -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-5/11.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aleris/zxing-typescript/ffd55027784de89822bc31e989815ea69258c780/src/test/core/resources/blackbox/qrcode-5/11.png -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-5/11.txt: -------------------------------------------------------------------------------- 1 | MECARD:N:Sean Owen;TEL:+12125658770;EMAIL:srowen@google.com;; -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-5/12.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aleris/zxing-typescript/ffd55027784de89822bc31e989815ea69258c780/src/test/core/resources/blackbox/qrcode-5/12.png -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-5/12.txt: -------------------------------------------------------------------------------- 1 | MECARD:N:Sean Owen;TEL:+12125658770;EMAIL:srowen@google.com;; -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-5/13.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aleris/zxing-typescript/ffd55027784de89822bc31e989815ea69258c780/src/test/core/resources/blackbox/qrcode-5/13.png -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-5/13.txt: -------------------------------------------------------------------------------- 1 | MECARD:N:Sean Owen;TEL:+12125658770;EMAIL:srowen@google.com;; -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-5/14.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aleris/zxing-typescript/ffd55027784de89822bc31e989815ea69258c780/src/test/core/resources/blackbox/qrcode-5/14.png -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-5/14.txt: -------------------------------------------------------------------------------- 1 | MECARD:N:Sean Owen;TEL:+12125658770;EMAIL:srowen@google.com;; -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-5/15.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aleris/zxing-typescript/ffd55027784de89822bc31e989815ea69258c780/src/test/core/resources/blackbox/qrcode-5/15.png -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-5/15.txt: -------------------------------------------------------------------------------- 1 | MECARD:N:Sean Owen;TEL:+12125658770;EMAIL:srowen@google.com;; -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-5/16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aleris/zxing-typescript/ffd55027784de89822bc31e989815ea69258c780/src/test/core/resources/blackbox/qrcode-5/16.png -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-5/16.txt: -------------------------------------------------------------------------------- 1 | THROUGH THE LOOKING-GLASS 2 | 3 | By Lewis Carroll 4 | 5 | 6 | CHAPTER I. Looking-Glass house 7 | 8 | One thing was certain, that the WHITE kitten had had nothing to do with 9 | it:--it was the black kitten's fault entirely. For the white kitten had 10 | been having its face washed by the old cat for the last quarter of 11 | an hour (and bearing it pretty well, considering); so you see that it 12 | COULDN'T have had any hand in the mischief. 13 | 14 | The way Dinah washed her children's faces was this: first she held the 15 | poor thing down by its ear with one paw, and then with the other paw she 16 | rubbed its face all over, the wrong way, beginning at the nose: and 17 | just now, as I said, she was hard at work on the white kitten, which was 18 | lying quite still and trying to purr--no doubt feeling that it was all 19 | meant for its good. 20 | 21 | But the black kitten had been finished with earlier in the afternoon, 22 | and so, while Alice was sitting curled up in a corner of the great 23 | arm-chair, half talking to herself and half asleep, the kitten had been 24 | having a grand game of romps with the ball of worsted Alice had been 25 | trying to wind up, and had been rolling it up and down till it had all 26 | come undone again; and there it was, spread over the hearth-rug, all 27 | knots and tangles, with the kitten running after its own tail in the 28 | middle. 29 | 30 | 'Oh, you wicked little thing!' cried Alice, catching up the kitten, and 31 | giving it a little kiss to make it understand that it was in disgrace. 32 | 'Really, Dinah ought to have taught you better manners! You OUGHT, 33 | Dinah, you know you ought!' she added, looking reproachfully at the old 34 | cat, and speaking in as cross a voice as she could manage--and then she 35 | scrambled back into the arm-chair, taking the kitten and the worsted 36 | with her, and began winding up the ball again. But she didn't get on 37 | very fast, as she was talking all the time, sometimes to the kitten, and 38 | sometimes to herself. Kitty sat very demurely on her knee, pretending to 39 | watch the progress of the winding, and now and then putting out one 40 | paw and gently touching the ball, as if it would be glad to help, if it 41 | might. 42 | 43 | 'Do you know what to-morrow is, Kitty?' Alice began. 'You'd have guessed 44 | if you'd been up in the window with me--only Dinah was making you tidy, 45 | so you couldn't. I was watching the boys getting in sticks for the 46 | bonfire--and it wants plenty of sticks, Kitty! Only it got so cold, and 47 | it snowed so, they had to leave off. Never mind, Kitty, we'll go and 48 | see the bonfire to-morrow.' Here Alice wound two or three turns of the 49 | worsted round the kitten's neck, just to see how it would look: this led 50 | to a scramble, in which the ball rolled down upon the floor, and yards 51 | and yards of it got unwound again. 52 | 53 | 'Do you know, I was so angry, Kitty,' Alice went on as soon as they were 54 | comfortably settled again, 'when I saw all the mischief you had been 55 | doing, I was very nearly opening the window, and putting you out into 56 | the snow! And you'd have deserved it, you little mischievous darling! 57 | Wha 58 | -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-5/17.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aleris/zxing-typescript/ffd55027784de89822bc31e989815ea69258c780/src/test/core/resources/blackbox/qrcode-5/17.png -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-5/17.txt: -------------------------------------------------------------------------------- 1 | THROUGH THE LOOKING-GLASS 2 | 3 | By Lewis Carroll 4 | 5 | 6 | CHAPTER I. Looking-Glass house 7 | 8 | One thing was certain, that the WHITE kitten had had nothing to do with 9 | it:--it was the black kitten's fault entirely. For the white kitten had 10 | been having its face washed by the old cat for the last quarter of 11 | an hour (and bearing it pretty well, considering); so you see that it 12 | COULDN'T have had any hand in the mischief. 13 | 14 | The way Dinah washed her children's faces was this: first she held the 15 | poor thing down by its ear with one paw, and then with the other paw she 16 | rubbed its face all over, the wrong way, beginning at the nose: and 17 | just now, as I said, she was hard at work on the white kitten, which was 18 | lying quite still and trying to purr--no doubt feeling that it was all 19 | meant for its good. 20 | 21 | But the black kitten had been finished with earlier in the afternoon, 22 | and so, while Alice was sitting curled up in a corner of the great 23 | arm-chair, half talking to herself and half asleep, the kitten had been 24 | having a grand game of romps with the ball of worsted Alice had been 25 | trying to wind up, and had been rolling it up and down till it had all 26 | come undone again; and there it was, spread over the hearth-rug, all 27 | knots and tangles, with the kitten running after its own tail in the 28 | middle. 29 | 30 | 'Oh, you wicked little thing!' cried Alice, catching up the kitten, and 31 | giving it a little kiss to make it understand that it was in disgrace. 32 | 'Really, Dinah ought to have taught you better manners! You OUGHT, 33 | Dinah, you know you ought!' she added, looking reproachfully at the old 34 | cat, and speaking in as cross a voice as she could manage--and then she 35 | scrambled back into the arm-chair, taking the kitten and the worsted 36 | with her, and began winding up the ball again. But she didn't get on 37 | very fast, as she was talking all the time, sometimes to the kitten, and 38 | sometimes to herself. Kitty sat very demurely on her knee, pretending to 39 | watch the progress of the winding, and now and then putting out one 40 | paw and gently touching the ball, as if it would be glad to help, if it 41 | might. 42 | 43 | 'Do you know what to-morrow is, Kitty?' Alice began. 'You'd have guessed 44 | if you'd been up in the window with me--only Dinah was making you tidy, 45 | so you couldn't. I was watching the boys getting in sticks for the 46 | bonfire--and it wants plenty of sticks, Kitty! Only it 47 | -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-5/18.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aleris/zxing-typescript/ffd55027784de89822bc31e989815ea69258c780/src/test/core/resources/blackbox/qrcode-5/18.png -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-5/18.txt: -------------------------------------------------------------------------------- 1 | THROUGH THE LOOKING-GLASS 2 | 3 | By Lewis Carroll 4 | 5 | 6 | CHAPTER I. Looking-Glass house 7 | 8 | One thing was certain, that the WHITE kitten had had nothing to do with 9 | it:--it was the black kitten's fault entirely. For the white kitten had 10 | been having its face washed by the old cat for the last quarter of 11 | an hour (and bearing it pretty well, considering); so you see that it 12 | COULDN'T have had any hand in the mischief. 13 | 14 | The way Dinah washed her children's faces was this: first she held the 15 | poor thing down by its ear with one paw, and then with the other paw she 16 | rubbed its face all over, the wrong way, beginning at the nose: and 17 | just now, as I said, she was hard at work on the white kitten, which was 18 | lying quite still and trying to purr--no doubt feeling that it was all 19 | meant for its good. 20 | 21 | But the black kitten had been finished with earlier in the afternoon, 22 | and so, while Alice was sitting curled up in a corner of the great 23 | arm-chair, half talking to herself and half asleep, the kitten had been 24 | having a grand game of romps with the ball of worsted Alice had been 25 | trying to wind up, and had been rolling it up and down till it had all 26 | come undone again; and there it was, spread over the hearth-rug, all 27 | knots and tangles, with the kitten running after its own tail in the 28 | middle. 29 | 30 | 'Oh, you wicked little thing!' cried Alice, catching up the kitten, and 31 | giving it a little kiss to make it understand that it was in disgrace. 32 | 'Really, Dinah ought to have taught you better manners! You OUGHT, 33 | Dinah, you know you ought!' she added, looking reproachfully at the old 34 | cat, and speaking in as cross a voice as she could manage--and then she 35 | scrambled back into the arm-ch 36 | 37 | -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-5/19.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aleris/zxing-typescript/ffd55027784de89822bc31e989815ea69258c780/src/test/core/resources/blackbox/qrcode-5/19.png -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-5/19.txt: -------------------------------------------------------------------------------- 1 | THROUGH THE LOOKING-GLASS 2 | 3 | By Lewis Carroll 4 | 5 | 6 | CHAPTER I. Looking-Glass house 7 | 8 | One thing was certain, that the WHITE kitten had had nothing to do with 9 | it:--it was the black kitten's fault entirely. For the white kitten had 10 | been having its face washed by the old cat for the last quarter of 11 | an hour (and bearing it pretty well, considering); so you see that it 12 | COULDN'T have had any hand in the mischief. 13 | 14 | The way Dinah washed her children's faces was this: first she held the 15 | poor thing down by its ear with one paw, and then with the other paw she 16 | rubbed its face all over, the wrong way, beginning at the nose: and 17 | just now, as I said, she was hard at work on the white kitten, which was 18 | lying quite still and trying to purr--no doubt feeling that it was all 19 | meant for its good. 20 | 21 | But the black kitten had been finished with earlier in the afternoon, 22 | and so, while Alice was sitting curled up in a corner of the great 23 | arm-chair, half talking to herself and half asleep, the kitten had been 24 | having a grand game of romps with the ball of worsted Alice had been 25 | trying to wind up, and had been rolling it up and down till it had all 26 | come undone again; and there it was, spread over the hearth-rug, all 27 | knots and tangles, with the kitten running after its own tail in the 28 | midd 29 | -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-6/1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aleris/zxing-typescript/ffd55027784de89822bc31e989815ea69258c780/src/test/core/resources/blackbox/qrcode-6/1.png -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-6/1.txt: -------------------------------------------------------------------------------- 1 | 1234567890 -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-6/10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aleris/zxing-typescript/ffd55027784de89822bc31e989815ea69258c780/src/test/core/resources/blackbox/qrcode-6/10.png -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-6/10.txt: -------------------------------------------------------------------------------- 1 | 1234567890 -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-6/11.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aleris/zxing-typescript/ffd55027784de89822bc31e989815ea69258c780/src/test/core/resources/blackbox/qrcode-6/11.png -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-6/11.txt: -------------------------------------------------------------------------------- 1 | 1234567890 -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-6/12.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aleris/zxing-typescript/ffd55027784de89822bc31e989815ea69258c780/src/test/core/resources/blackbox/qrcode-6/12.png -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-6/12.txt: -------------------------------------------------------------------------------- 1 | 1234567890 -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-6/13.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aleris/zxing-typescript/ffd55027784de89822bc31e989815ea69258c780/src/test/core/resources/blackbox/qrcode-6/13.png -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-6/13.txt: -------------------------------------------------------------------------------- 1 | 1234567890 -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-6/14.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aleris/zxing-typescript/ffd55027784de89822bc31e989815ea69258c780/src/test/core/resources/blackbox/qrcode-6/14.png -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-6/14.txt: -------------------------------------------------------------------------------- 1 | 1234567890 -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-6/15.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aleris/zxing-typescript/ffd55027784de89822bc31e989815ea69258c780/src/test/core/resources/blackbox/qrcode-6/15.png -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-6/15.txt: -------------------------------------------------------------------------------- 1 | TEST -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-6/2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aleris/zxing-typescript/ffd55027784de89822bc31e989815ea69258c780/src/test/core/resources/blackbox/qrcode-6/2.png -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-6/2.txt: -------------------------------------------------------------------------------- 1 | 1234567890 -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-6/3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aleris/zxing-typescript/ffd55027784de89822bc31e989815ea69258c780/src/test/core/resources/blackbox/qrcode-6/3.png -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-6/3.txt: -------------------------------------------------------------------------------- 1 | 1234567890 -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-6/4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aleris/zxing-typescript/ffd55027784de89822bc31e989815ea69258c780/src/test/core/resources/blackbox/qrcode-6/4.png -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-6/4.txt: -------------------------------------------------------------------------------- 1 | 1234567890 -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-6/5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aleris/zxing-typescript/ffd55027784de89822bc31e989815ea69258c780/src/test/core/resources/blackbox/qrcode-6/5.png -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-6/5.txt: -------------------------------------------------------------------------------- 1 | 1234567890 -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-6/6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aleris/zxing-typescript/ffd55027784de89822bc31e989815ea69258c780/src/test/core/resources/blackbox/qrcode-6/6.png -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-6/6.txt: -------------------------------------------------------------------------------- 1 | 1234567890 -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-6/7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aleris/zxing-typescript/ffd55027784de89822bc31e989815ea69258c780/src/test/core/resources/blackbox/qrcode-6/7.png -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-6/7.txt: -------------------------------------------------------------------------------- 1 | 1234567890 -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-6/8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aleris/zxing-typescript/ffd55027784de89822bc31e989815ea69258c780/src/test/core/resources/blackbox/qrcode-6/8.png -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-6/8.txt: -------------------------------------------------------------------------------- 1 | 1234567890 -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-6/9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aleris/zxing-typescript/ffd55027784de89822bc31e989815ea69258c780/src/test/core/resources/blackbox/qrcode-6/9.png -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-6/9.txt: -------------------------------------------------------------------------------- 1 | 1234567890 -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-7/1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aleris/zxing-typescript/ffd55027784de89822bc31e989815ea69258c780/src/test/core/resources/blackbox/qrcode-7/1.png -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-7/1.txt: -------------------------------------------------------------------------------- 1 | 192.168.1.13:3000 -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-7/2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aleris/zxing-typescript/ffd55027784de89822bc31e989815ea69258c780/src/test/core/resources/blackbox/qrcode-7/2.png -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-7/2.txt: -------------------------------------------------------------------------------- 1 | 192.168.1.13:3000 -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-7/3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aleris/zxing-typescript/ffd55027784de89822bc31e989815ea69258c780/src/test/core/resources/blackbox/qrcode-7/3.png -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-7/3.txt: -------------------------------------------------------------------------------- 1 | 12345678 -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-7/4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aleris/zxing-typescript/ffd55027784de89822bc31e989815ea69258c780/src/test/core/resources/blackbox/qrcode-7/4.png -------------------------------------------------------------------------------- /src/test/core/resources/blackbox/qrcode-7/4.txt: -------------------------------------------------------------------------------- 1 | https://www.the-qrcode-generator.com/ -------------------------------------------------------------------------------- /src/test/core/resources/golden/qrcode/renderer-test-01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aleris/zxing-typescript/ffd55027784de89822bc31e989815ea69258c780/src/test/core/resources/golden/qrcode/renderer-test-01.png -------------------------------------------------------------------------------- /src/test/core/util/AssertUtils.ts: -------------------------------------------------------------------------------- 1 | export default class AssertUtils { 2 | public static typedArraysAreEqual(left: Int32Array|Uint8ClampedArray, right: Int32Array|Uint8ClampedArray, size?: number): boolean { 3 | if (undefined === size) { 4 | size = Math.max(left.length, right.length) 5 | } 6 | for (let i = 0; i < size; i++) { 7 | if (left[i] !== right[i]) { 8 | return false 9 | } 10 | } 11 | return true 12 | } 13 | } -------------------------------------------------------------------------------- /src/test/core/util/Random.ts: -------------------------------------------------------------------------------- 1 | import * as seedrandom from 'seedrandom' 2 | 3 | export default class Random { 4 | private r: seedrandom.prng 5 | public constructor(seed: string) { 6 | this.r = seedrandom(seed) 7 | } 8 | 9 | public next(max: number): number { 10 | return Math.floor(this.r() * max) 11 | } 12 | } -------------------------------------------------------------------------------- /tsconfig-dist.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "es6", 4 | "module": "es6", 5 | "moduleResolution": "node", 6 | "sourceMap": true, 7 | "lib": ["es6", "dom"], 8 | "outDir": "./build-node/", 9 | "suppressImplicitAnyIndexErrors": true, 10 | "alwaysStrict": true, 11 | "noImplicitAny": true, 12 | "declaration": false, 13 | "removeComments": true 14 | }, 15 | "awesomeTypescriptLoaderOptions": { 16 | "useBabel": true, 17 | "useCache": true 18 | }, 19 | "include": [ 20 | "src" 21 | ], 22 | "exclude": [ 23 | "node_modules", 24 | "src/test" 25 | ] 26 | } -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "es5", 4 | "module": "commonjs", 5 | "moduleResolution": "node", 6 | "sourceMap": true, 7 | "lib": ["es5", "es6", "dom"], 8 | "outDir": "./build-node/", 9 | "suppressImplicitAnyIndexErrors": true, 10 | "alwaysStrict": true, 11 | "noImplicitAny": true, 12 | "declaration": true 13 | }, 14 | "include": [ 15 | "src" 16 | ], 17 | "exclude": [ 18 | "node_modules" 19 | ] 20 | } 21 | -------------------------------------------------------------------------------- /tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "defaultSeverity": "error", 3 | "extends": [ 4 | "tslint:recommended" 5 | ], 6 | "jsRules": {}, 7 | "rules": { 8 | "semicolon": [true, "never"], 9 | "quotemark": [true, "single"], 10 | "no-bitwise": false, /* we use a lot of these */ 11 | "member-ordering": [false] /* to keep the same as with the java version */ 12 | }, 13 | "rulesDirectory": [] 14 | } 15 | -------------------------------------------------------------------------------- /webpack.config.js: -------------------------------------------------------------------------------- 1 | const path = require('path') 2 | //const webpack = require('webpack') 3 | //const UglifyJsPlugin = webpack.optimize.UglifyJsPlugin 4 | const env = require('yargs').argv.env // use --env with webpack 2 5 | 6 | const libraryName = 'ZXing' 7 | 8 | let outputFile 9 | 10 | if (env === 'dist') { 11 | //plugins.push(new UglifyJsPlugin()) 12 | outputFile = libraryName.toLowerCase() + '.[name].min.js' 13 | } else { 14 | outputFile = libraryName.toLowerCase() + '.[name].js' 15 | } 16 | 17 | const outputDir = path.join(__dirname, 'build-browser') 18 | 19 | module.exports = { 20 | context: __dirname, 21 | entry: { 22 | 'qrcodereader': './src/browser/BrowserQRCodeReader', 23 | 'qrcodewriter': './src/browser/BrowserQRCodeSvgWriter' 24 | }, 25 | devtool: 'source-map', 26 | output: { 27 | path: outputDir, 28 | filename: outputFile, 29 | library: libraryName, 30 | libraryTarget: 'umd', 31 | umdNamedDefine: true 32 | }, 33 | externals: { 34 | 'text-encoding': { 35 | commonjs: 'text-encoding', 36 | commonjs2: 'text-encoding', 37 | amd: 'text-encoding', 38 | root: 'text-encoding' 39 | } 40 | }, 41 | module: { 42 | rules: [{ 43 | enforce: 'pre', 44 | test: /\.js$/, 45 | loader: 'source-map-loader' 46 | }, 47 | { 48 | test: /\.ts$/, 49 | use: [ 50 | 'babel-loader', 51 | 'awesome-typescript-loader?configFileName=tsconfig-dist.json', 52 | ], 53 | //exclude: /node_modules/ 54 | }] 55 | }, 56 | resolve: { 57 | modules: ['node_modules', path.resolve('./src')], 58 | extensions: ['.ts', '.js'] 59 | } 60 | } --------------------------------------------------------------------------------