New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

vision-camera-dynamsoft-barcode-reader

Package Overview
Dependencies
Maintainers
1
Versions
35
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vision-camera-dynamsoft-barcode-reader

React Native Vision Camera Frame Processor Plugin of Dynamsoft Barcode Reader

latest
Source
npmnpm
Version
2.3.0
Version published
Weekly downloads
16
128.57%
Maintainers
1
Weekly downloads
 
Created
Source

vision-camera-dynamsoft-barcode-reader

React Native Vision Camera Frame Processor Plugin of Dynamsoft Barcode Reader.

If you do not want to use Vision Camera, you can use the offical React Native package by Dynamsoft.

Versions

For vision-camera v2, use versions 0.x.

For vision-camera v3, use versions 1.x.

For vision-camera v4, use versions >= 2.0.0.

SDK Versions Used for Different Platforms

ProductAndroidiOS
Dynamsoft Barcode Reader9.x9.x

Installation

yarn add vision-camera-dynamsoft-barcode-reader
cd ios && pod install

Add the plugin to your babel.config.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

  • Scan barcodes with vision camera.

    import { decode } from 'vision-camera-dynamsoft-barcode-reader';
    
    // ...
    const frameProcessor = useFrameProcessor((frame) => {
      'worklet';
      const barcodes = decode(frame);
    }, []);
    
  • Scan barcodes from a base64-encoded static image.

    let results = await decodeBase64(base64);
    
  • License initialization (apply for a trial license).

    await initLicense("your license");
    

Interfaces

TextResult:

 TextResult{
    barcodeText:string;
    barcodeFormat:string;
    barcodeBytesBase64:string;
    x1:number;
    x2:number;
    x3:number;
    x4:number;
    y1:number;
    y2:number;
    y3:number;
    y4:number;
}

Configuration:

DBRConfig{
  template?:string;
  license?:string;
  isFront?:boolean;
  rotateImage?:boolean;
}

Since the natural camera sensor's orientation is landscape, the camera image may be rotated for preview while the raw image we get is still not rotated. If we enable rotateImage, the plugin will rotate the image automatically to match the camera preview. If it is disabled, the plugin will rotate the returned coordinates instead of the image which may have a slight performance gain. isFront is needed for rotating the coordinates since the image of front camera is mirrored. isFront is Android-only.

Supported Platforms

  • Android
  • iOS

Supported Barcode Symbologies

  • Code 11
  • Code 39
  • Code 93
  • Code 128
  • Codabar
  • EAN-8
  • EAN-13
  • UPC-A
  • UPC-E
  • Interleaved 2 of 5 (ITF)
  • Industrial 2 of 5 (Code 2 of 5 Industry, Standard 2 of 5, Code 2 of 5)
  • ITF-14
  • QRCode
  • DataMatrix
  • PDF417
  • GS1 DataBar
  • Maxicode
  • Micro PDF417
  • Micro QR
  • PatchCode
  • GS1 Composite
  • Postal Code
  • Dot Code

Blog

Contributing

See the contributing guide to learn how to contribute to the repository and the development workflow.

License

MIT

Keywords

react-native

FAQs

Package last updated on 22 Sep 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts