Giter Site home page Giter Site logo

zxing-dart's People

Contributors

shirne avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

zxing-dart's Issues

How to use with ImageStream

In camera module we have an option to get stream of frames
_controller.startImageStream( CameraImgae image => { } )
How can I decode it from that CameraImage object?
In your example you decode it from Xpic file, but I prefer to decode it with stream because it should be more efficient for live decode

In addition, when I get the results, does it possible to get the positions of each result? like we can in flutter_zxing lib.

Datamatrix encode issue

Hello, I'm trying to encode data matrix format.

try {
  var dataMatrixWriter = MultiFormatWriter();
  var encode = dataMatrixWriter.encode(
      'FR03AV011E7F1E7FR03AV011E7F1E7FR03AV011E7F1E7FR03AV011E7F1E7FR03AV011E7F1E7FR03AV011E7F1E7FR03AV011E7F1E7FR03AV011E7F1E7FR03AV011E7F1E7FR03AV011E7F1E7FR03AV011E7F1E7FR03AV011E7F1E7FR03AV011E7F1E7FR03AV011E7F1E7',
      BarcodeFormat.DATA_MATRIX,
      48,
      48, {EncodeHintType.DATA_MATRIX_SHAPE : SymbolShapeHint.FORCE_SQUARE, EncodeHintType.MIN_SIZE: Dimension(48,48)});
  var scale = 15;
  var image = img.Image((encode.width + 2) * scale, (encode.height + 2) * scale);
  img.fill(image, Colors.white.value);
  for (var x = 0; x < encode.width; x++) {
    for (var y = 0; y < encode.height; y++) {
      if (encode.get(x, y)) {
        img.fillRect(image, (x + 1) * scale, (y + 1) * scale, (x + 1) * scale + scale,
            (y + 1) * scale + scale, Colors.black.value);
      }
    }
  }
  var pngBytes = img.encodePng(image);
  final File generatedImg = MemoryFileSystem().file('test_' + getRandomString(15));
  generatedImg.writeAsBytesSync(pngBytes);
  setState(() {
    _generatedImg = generatedImg;
  });
} catch (e, s) {
  print(s);
  print(e);
}

There are two errors:

  • The borders of the matrix are not correct, see:

tempFileForShare_20210615-204956
The first pixel must be black, the 2nd one white, the 3rd black, etc...
Same thing for the second module, it starts with white instead of black.

  • I cannot encode with a size more than 48x48 (example 52x52):
try {
  var encode = dataMatrixWriter.encode(
        'FR03AV011E7F1E7FR03AV011E7F1E7FR03AV011E7F1E7FR03AV011E7F1E7FR03AV011E7F1E7FR03AV011E7F1E7FR03AV011E7F1E7FR03AV011E7F1E7FR03AV011E7F1E7FR03AV011E7F1E7FR03AV011E7F1E7FR03AV011E7F1E7FR03AV011E7F1E7FR03AV011E7F1E7',
        BarcodeFormat.DATA_MATRIX,
        52,
        52, {EncodeHintType.DATA_MATRIX_SHAPE : SymbolShapeHint.FORCE_SQUARE, EncodeHintType.MIN_SIZE: Dimension(52,52)});
} catch (e, s) {
  print(s);
  print(e);
}
I/flutter ( 6641): #0      _StringBase.substring (dart:core-patch/string_patch.dart:399:7)
I/flutter ( 6641): #1      StringBuilder.replace (package:zxing_lib/src/common/string_builder.dart:39:39)
I/flutter ( 6641): #2      StringBuilder.setCharAt (package:zxing_lib/src/common/string_builder.dart:28:5)
I/flutter ( 6641): #3      ErrorCorrection.encodeECC200 (package:zxing_lib/src/datamatrix/encoder/error_correction.dart:119:14)
I/flutter ( 6641): #4      DataMatrixWriter.encode (package:zxing_lib/src/datamatrix/data_matrix_writer.dart:84:40)
I/flutter ( 6641): #5      MultiFormatWriter.encode (package:zxing_lib/src/multi_format_writer.dart:87:19)
I/flutter ( 6641): #6      _FullScreenCertState.initState.<anonymous closure> (package:pass_sanitaire/main.dart:650:39)
I/flutter ( 6641): #7      _FullScreenCertState.initState.<anonymous closure> (package:pass_sanitaire/main.dart:647:34)
I/flutter ( 6641): #8      _rootRunUnary (dart:async/zone.dart:1436:47)
I/flutter ( 6641): #9      _CustomZone.runUnary (dart:async/zone.dart:1335:19)
I/flutter ( 6641): <asynchronous suspension>
I/flutter ( 6641): RangeError: Value not in range: 206

PDF 417 Decoding in Flutter Web

Would you be able to make this work for Flutter Web, I've been trying to read PDF417 codes using a webcam and haven't had any luck with my own ports or using system channels with / js workarounds.

无二维码/条形码时,实时识别效率特别低

Is your feature request related to a problem? Please describe.
如题,我对比了 flutter_zxing(ffi)和 zxing_lib(dart)

  1. 在有二维码/条形时,二者实时识别效率相差不大,甚至 zxing_lib 速度更快(0.006-0.02秒左右),表现更优
  2. 在无二维码/条形时,flutter_zxing 的识别效率变化不大,而 zxing_lib 速度特别慢(1-3秒左右),这是完全无法接受的

Describe the solution you'd like
优化 zxing_lib 在无二维码/条形时的实时识别效率

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

Some files are missing in pub.dev package repository

Describe the bug
Package installed through flutter pub add does not have same amount of files that git repo has.

To Reproduce
Steps to reproduce the behavior:

  1. Create a project
  2. Add package through flutter pub add zxing_lib command
  3. Copy decoder.dart from examples
  4. lib/models/decoder.dart:188:17: Error: Couldn't find constructor 'DecodeHint'. in the debug console

Tried reinstalling and updating package, no effect.

Expected behavior
No errors

Screenshots
Attached screenshot with missing decode_hint.dart (and others) file

List of file from flutter pub

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.