ng-barcode-detector
TypeScript icon, indicating that this package has built-in type declarations

0.0.18 • Public • Published

ng-barcode-detector

A library using the Barcode Detection API implemented in Chrome 83.

The Barcode Detection API is a subset of the Shape Detection API which provides the ability to detect and decode barcodes in an image provided by script. The image may come from any type of image buffer source such as an image, video or canvas tag.

Some native platforms include built-in libraries for performing text detection and optical character recognition (OCR) in images. The availability of these libraries means that developers do not need to include a large third party library.

Demo

Installation

npm install --save ng-barcode-detector

Usage

import { NgBarcodeDetectorModule } from 'ng-barcode-detector';

@NgModule({
  imports: [NgBarcodeDetectorModule],
})
export class AppModule {}
<ng-barcode-detector (detect)="onDetect($event)"></ng-barcode-detector>
import { Component } from '@angular/core';

@Component({
  selector: 'app-root',
  templateUrl: './app.component.html',
  styleUrls: ['./app.component.css'],
})
export class AppComponent {
  public onDetect(result: string): void {
    alert(result);
  }
}

Dependents (0)

Package Sidebar

Install

npm i ng-barcode-detector

Weekly Downloads

6

Version

0.0.18

License

none

Unpacked Size

109 kB

Total Files

19

Last publish

Collaborators

  • hirebarend