Zxing-js/library: Multi-format 1D/2D Barcode Image ... - GitHub

Skip to content Dismiss alert {{ message }} / library Public
  • Notifications You must be signed in to change notification settings
  • Fork 533
  • Star 2.3k

Multi-format 1D/2D barcode image processing library, usable in JavaScript ecosystem.

zxing-js.github.io/library/

License

Apache-2.0 license 2.3k stars 533 forks Branches Tags Activity Star Notifications You must be signed in to change notification settings
  • Code
  • Issues 150
  • Pull requests 4
  • Actions
  • Projects 6
  • Security
  • Insights
Additional navigation options zxing-js/library This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.  masterBranchesTagsGo to fileCode

Folders and files

NameNameLast commit messageLast commit date

Latest commit

 

History

1,184 Commits

.github

.github

  

.vscode

.vscode

  

docs

docs

  

src

src

  

.editorconfig

.editorconfig

  

.eslintrc

.eslintrc

  

.gitignore

.gitignore

  

.prettierrc

.prettierrc

  

.unibeautify.json

.unibeautify.json

  

CONTRIBUTING.md

CONTRIBUTING.md

  

HELPER_REGEX.md

HELPER_REGEX.md

  

LICENSE

LICENSE

  

README.md

README.md

  

_config.yml

_config.yml

  

karma.conf.js

karma.conf.js

  

package.json

package.json

  

rollup.config.js

rollup.config.js

  

tsconfig.json

tsconfig.json

  

tsconfig.lib-cjs.json

tsconfig.lib-cjs.json

  

tsconfig.lib-es2015.json

tsconfig.lib-es2015.json

  

tsconfig.lib-esm.json

tsconfig.lib-esm.json

  

tsconfig.lib-esnext.json

tsconfig.lib-esnext.json

  

tsconfig.test.json

tsconfig.test.json

  

tslint.json

tslint.json

  

yarn.lock

yarn.lock

  
View all files

Repository files navigation

  • README
  • Apache-2.0 license

ZXing

Project in Maintenance Mode Only

The project is in maintenance mode, meaning, changes are driven by contributed patches. Only bug fixes and minor enhancements will be considered. The Barcode Scanner app can no longer be published, so it's unlikely any changes will be accepted for it. There is otherwise no active development or roadmap for this project. It is "DIY".

Runs on your favorite ECMAScript ecosystem

If it doesn't, we gonna make it.

What is ZXing?

ZXing ("zebra crossing") is an open-source, multi-format 1D/2D barcode image processing library implemented in Java, with ports to other languages.

Supported Formats

See Projects and Milestones for what is currently done and what's planned next. 👀

1D product 1D industrial 2D
UPC-A Code 39 QR Code
UPC-E Code 93 Data Matrix
EAN-8 Code 128 Aztec
EAN-13 Codabar PDF 417
ITF MaxiCode
RSS-14
RSS-Expanded (not production ready!)

Status

Maintainer wanted Greenkeeper badge

NPM version npm Contributors Commits to deploy

Maintainability Test Coverage

Attention

NOTE: While we do not have the time to actively maintain zxing-js anymore, we are open to new maintainers taking the lead.

Demo

See Live Preview in browser.

Note: All the examples are using ES6, be sure is supported in your browser or modify as needed, Chrome recommended.

Installation

npm i @zxing/library --save

or

yarn add @zxing/library

Limitations

On iOS-Devices with iOS < 14.3 camera access works only in native Safari and not in other Browsers (Chrome,...) or Apps that use an UIWebView or WKWebView. This is not a restriction of this library but of the limited WebRTC support by Apple. The behavior might change in iOS 11.3 (Apr 2018?, not tested) as stated here

iOS 14.3 (released in december 2020) now supports WebRTC in 3rd party browsers as well 🎉

Browser Support

The browser layer is using the MediaDevices web API which is not supported by older browsers.

You can use external polyfills like WebRTC adapter to increase browser compatibility.

Also, note that the library is using the TypedArray (Int32Array, Uint8ClampedArray, etc.) which are not available in older browsers (e.g. Android 4 default browser).

You can use core-js to add support to these browsers.

In the PDF 417 decoder recent addition, the library now makes use of the new BigInt type, which is not supported by all browsers as well. There's no way to polyfill that and ponyfill libraries are way to big, but even if PDF 417 decoding relies on BigInt the rest of the library shall work ok in browsers that doesn't support it.

There's no polyfills for BigInt in the way it's coded in here.

Usage

// use with commonJS const { MultiFormatReader, BarcodeFormat } = require('@zxing/library'); // or with ES6 modules import { MultiFormatReader, BarcodeFormat } from '@zxing/library'; const hints = new Map(); const formats = [BarcodeFormat.QR_CODE, BarcodeFormat.DATA_MATRIX/*, ...*/]; hints.set(DecodeHintType.POSSIBLE_FORMATS, formats); const reader = new MultiFormatReader(); const luminanceSource = new RGBLuminanceSource(imgByteArray, imgWidth, imgHeight); const binaryBitmap = new BinaryBitmap(new HybridBinarizer(luminanceSource)); reader.decode(binaryBitmap, hints);

Contributing

See Contributing Guide for information regarding porting approach and reasoning behind some of the approaches taken.

Contributors

Special thanks to all the contributors who have contributed for this project. We heartly thankful to you all.

And a special thanks to @aleris who created the project itself and made available the initial QR code port.

Bless

About

Multi-format 1D/2D barcode image processing library, usable in JavaScript ecosystem.

zxing-js.github.io/library/

Topics

typescript qrcode barcode zxing hacktoberfest encoding-library decoding-images

Resources

Readme

License

Apache-2.0 license Activity Custom properties

Stars

2.3k stars

Watchers

47 watching

Forks

533 forks Report repository

Releases 53

v0.21.0 Latest Apr 29, 2024 + 52 releases

Sponsor this project

  • open_collective opencollective.com/zxing-js
  • https://picpay.me/odahcam
  • https://apoia.se/zxing

Packages 1

Contributors 54

  • @odahcam
  • @werthdavid
  • @aleris
  • @dependabot[bot]
  • @pimuzzo
  • @mpodlasin
  • @jeroenv
  • @jojastahl
  • @0ndorio
  • @Tjieco
  • @rikmms
  • @vHeemstra
  • @greenkeeper[bot]
  • @sam2332
+ 40 contributors

Languages

  • TypeScript 93.6%
  • Java 6.2%
  • JavaScript 0.2%
You can’t perform that action at this time.

Từ khóa » Xing Js