zxing-js / library

Multi-format 1D/2D barcode image processing library, usable in JavaScript ecosystem.
https://zxing-js.github.io/library/
Apache License 2.0
2.43k stars 541 forks source link

Scan 1D/2D Code from Image example error #545

Open jianzhou520 opened 1 year ago

jianzhou520 commented 1 year ago

Describe the bug Scan 1D/2D Code from Image example page cannot run correctly. https://zxing-js.github.io/library/examples/multi-image/

To Reproduce Steps to reproduce the behavior:

  1. load page and click decode button

Expected behavior show right qrcode results

Screenshots

image
mageshk98 commented 1 year ago

@jianzhou520 Waiting for this pr to be merged https://github.com/zxing-js/library/pull/530.

Meanwhile I am using a workaround. i.e,

const img = document.getElementById('img'); img.videoWidth = 0; codeReader.decodeFromImage(img).then((result) => { //Logic goes here }

mikejhill commented 1 year ago

Possibly related, several other examples are failing in 0.19.2. We're running into trouble with many decodeFromImage calls. We reverted to 0.17.1, which works for us.

It looks like #536 might (?) intend to address these. However, I did try applying that change manually and the examples still seem to be failing for me.

https://zxing-js.github.io/library/examples/barcode-image/: image

https://zxing-js.github.io/library/examples/datamatrix-image/: image

https://zxing-js.github.io/library/examples/qr-image/: image

github-actions[bot] commented 4 months ago

Stale issue message