Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

License

NotificationsYou must be signed in to change notification settings

zxing-js/library

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ZXing

Looking for an actively maintained barcode scanning library with commercial support?Check outSTRICH – Barcode Scanning for Web Apps.

Project in Maintenance Mode Only

Warning

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 canno 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

SeeProjects andMilestones for what is currently done and what's planned next. 👀

1D product1D industrial2D
UPC-ACode 39QR Code
UPC-ECode 93Data Matrix
EAN-8Code 128Aztec
EAN-13CodabarPDF 417
ITFMaxiCode
RSS-14
RSS-Expanded (not production ready!)

Status

Maintainer wantedGreenkeeper badge

NPM versionnpmContributorsCommits to deploy

MaintainabilityTest 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

SeeLive 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-Deviceswith 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 statedhere

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

Browser Support

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

You can use external polyfills likeWebRTC adapter to increase browser compatibility.

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

You can usecore-js to add support to these browsers.

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

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

Usage

// use with commonJSconst{ MultiFormatReader, BarcodeFormat}=require('@zxing/library');// or with ES6 modulesimport{MultiFormatReader,BarcodeFormat}from'@zxing/library';consthints=newMap();constformats=[BarcodeFormat.QR_CODE,BarcodeFormat.DATA_MATRIX/*, ...*/];hints.set(DecodeHintType.POSSIBLE_FORMATS,formats);constreader=newMultiFormatReader();constluminanceSource=newRGBLuminanceSource(imgByteArray,imgWidth,imgHeight);constbinaryBitmap=newBinaryBitmap(newHybridBinarizer(luminanceSource));reader.decode(binaryBitmap,hints);

Contributing

SeeContributing 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.

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Sponsor this project

    Packages

     
     
     

    [8]ページ先頭

    ©2009-2025 Movatter.jp