Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

384
Views
"Malformed data passed to binarizer" during QR generation

I'm trying to generate a barcode on the web from the png image. I'm using "jsqr" library. My code looks like this:

loadBarcodeImage() async {
    Uint8List? image = await fileUtils.getFileFromLocal(['jpg', 'jpeg', 'png']);
    chosenBarcodeImage = image;
    Uint8ClampedList clampedList = image!.buffer.asUint8ClampedList();
    js.JsArray js_array = js.JsArray.from(clampedList);
    callUIBarcodeScanner(js_array);
}
callUIBarcodeScanner(dynamic barcodeImage) {
    var barcode = jsqr.jsQR(barcodeImage, 100, 100);
    print(barcode);
}

I had been tried a couple of other list types but still getting:

Malformed data passed to binarizer.
    at Object.e.binarize (https://cdn.jsdelivr.net/npm/jsqr@1.3.1/dist/jsQR.min.js:7:6194)
    at l (https://cdn.jsdelivr.net/npm/jsqr@1.3.1/dist/jsQR.min.js:7:5602)

Please, help

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!