edi9999 / jsqrcode

[deprecated] Lazarsoft's jsqrcode as a node module, object oriented, and with tests
Apache License 2.0
278 stars 63 forks source link

Image is not defined #44

Closed Ethan0007 closed 6 years ago

Ethan0007 commented 7 years ago

Hi,

I'm using react-native and I'm trying to decode bar-code base on the camera result and follow the docs instruction, but when i call the qr.decode(data.path) it will give me an exception . "Image is not define";

Please be advised.

Thanks

hponcet commented 7 years ago

Hi, Same problem for me.

edi9999 commented 7 years ago

This means that you are not using the right data format.

In nodejs, you have to pass an image buffer .

See the tests for details

https://github.com/edi9999/jsqrcode/blob/master/test/qrcode.js

Shery11 commented 6 years ago

Hi, I am encountering the same issue, i am generating a qr code using another library its gives me url of qrcode which is base64 encoded. I am passing it like this qr.decode(url) i am getting this error "Image is not defined"

Any suggestions?

eriforce commented 6 years ago

Hi, I am encountering the same issue when decoding from an url.

edi9999 commented 6 years ago

You have to parse your image with image-parser first