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.51k stars 547 forks source link

getRawBytes returns null #563

Open xulihang opened 1 year ago

xulihang commented 1 year ago

I am trying to get the bytes of barcodes but it returns null.

The comment says that it returns raw bytes encoded by the barcode, if applicable, otherwise null. I wonder when it is applicable.

werthdavid commented 1 year ago

Can you attach the barcode?

xulihang commented 1 year ago

This one: Special_0280

werthdavid commented 1 year ago

The library is able to correctly read that given Code-39, I manually made a unit-test with that image (I cropped it though). Do you use a camera to scan that? Or the image file? It is quite a complex code...

xulihang commented 1 year ago

I need to read the image file. The content of the PDF417 is stored as bytes so I need to use getRawBytes.

werthdavid commented 1 year ago

If I use a PDF417Reader instead of a MultiFormatReader I can read and recognize it

github-actions[bot] commented 7 months ago

Stale issue message