zxing-js / library

Multi-format 1D/2D barcode image processing library, usable in JavaScript ecosystem.

Home Page:https://zxing-js.github.io/library/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Scan 1D/2D Code from Image example error

jianzhou520 opened this issue · comments

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

@jianzhou520 Waiting for this pr to be merged #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 }

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

Stale issue message