zxing2 0.1.1 copy "zxing2: ^0.1.1" to clipboard
zxing2: ^0.1.1 copied to clipboard

outdated

A multi-format 1D/2D barcode image processing library implemented in Dart. This is a port of the Android library.

example/main.dart

import 'dart:io';
import 'package:image/image.dart' as img;
import 'package:zxing2/qrcode.dart';

void main() {
  var image = img.decodePng(File('tool/example.png').readAsBytesSync())!;

  LuminanceSource source = RGBLuminanceSource(image.width, image.height,
      image.getBytes(format: img.Format.abgr).buffer.asInt32List());
  var bitmap = BinaryBitmap(HybridBinarizer(source));

  var reader = QRCodeReader();
  var result = reader.decode(bitmap);
  print(result.text);
}
52
likes
0
pub points
97%
popularity

Publisher

verified publisherxaha.dev

A multi-format 1D/2D barcode image processing library implemented in Dart. This is a port of the Android library.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

charcode, collection, fixnum, meta

More

Packages that depend on zxing2