Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/xulihang/vision-camera-zxing
React Native Vision Camera Frame Processor Plugin using ZXing
https://github.com/xulihang/vision-camera-zxing
barcode barcode-scanner ean qrcode qrcode-scanner react-native scanner upc vision-camera zxing
Last synced: 22 days ago
JSON representation
React Native Vision Camera Frame Processor Plugin using ZXing
- Host: GitHub
- URL: https://github.com/xulihang/vision-camera-zxing
- Owner: xulihang
- License: mit
- Created: 2024-09-14T01:50:51.000Z (2 months ago)
- Default Branch: main
- Last Pushed: 2024-09-14T08:34:59.000Z (2 months ago)
- Last Synced: 2024-10-14T22:40:59.114Z (about 1 month ago)
- Topics: barcode, barcode-scanner, ean, qrcode, qrcode-scanner, react-native, scanner, upc, vision-camera, zxing
- Language: Java
- Homepage:
- Size: 1.44 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# vision-camera-zxing
A barcode reading frame processor plugin for Vision Camera using ZXing.
It uses [ZXing Android Embedded](https://github.com/journeyapps/zxing-android-embedded) for Android and [ZXingObjC](https://github.com/zxingify/zxingify-objc) for iOS.
## Installation
```sh
npm install vision-camera-zxing
cd ios && pod install
```Add the plugin to your `babel.config.js`:
```js
module.exports = {
plugins: [['react-native-worklets-core/plugin']],
// ...
```> Note: You have to restart metro-bundler for changes in the `babel.config.js` file to take effect.
## Usage
1. Scan barcodes with vision camera.
```js
import { zxing } from 'vision-camera-zxing';
// ...
const frameProcessor = useFrameProcessor((frame) => {
'worklet';
const barcodes = zxing(frame,{multiple:true});
}, []);
```
2. Scan barcodes from a base64-encoded static image.```ts
let results = await decodeBase64(base64,{multiple:true});
```## Limitation
ZXing has a requirement of the direction of the barcode to scan and cannot return the exact barcode region.
You can use [Dynamsoft Barcode Reader](https://github.com/tony-xlh/vision-camera-dynamsoft-barcode-reader) instead to meet your needs.
## Contributing
See the [contributing guide](CONTRIBUTING.md) to learn how to contribute to the repository and the development workflow.
## License
MIT
---
Made with [create-react-native-library](https://github.com/callstack/react-native-builder-bob)