Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Center image not rendering on NodeJs #258

Open
BuyMyBeard opened this issue Nov 14, 2024 · 3 comments
Open

Center image not rendering on NodeJs #258

BuyMyBeard opened this issue Nov 14, 2024 · 3 comments

Comments

@BuyMyBeard
Copy link

BuyMyBeard commented Nov 14, 2024

When we provide Qr Code an image with a base64 encoded data uri, no image is rendered in the middle of the QR Code using nodejs.

I have personally tried to debug the problem, but it is very hard to diagnosticate the problem, since this fails silently. This could very well be a problem with the jsdom or canvas libraries. The issue arises when the QR Code tries to convert the qrSVG to base64 and loads it in the canvas. The tag containing the center image does not render an image on nodejs.

I found multiple relevant issues, mainly #163.

This was first implemented 3 years ago in #43 and was recently fixed in #241. I'd be curious if this was working prior. From looking at the nodejs example, it originally tried to load the image with an xml http request, and the image was linked directly from a web http url, but that code was removed in #241.

Either way, trying to load an image, either locally, remotely, or directly with a data base64 encoded uri doesn't work anymore. I'd like to know if this is a regression caused by this package or by canvas.

@lb-ovc
Copy link

lb-ovc commented Nov 21, 2024

We are experiencing the same issue. It does load after refreshing the browser tho.

@BuyMyBeard Could you try version 1.6.0? It seems to be working in that version.

@BuyMyBeard
Copy link
Author

We are experiencing the same issue. It does load after refreshing the browser tho.

You refresh your browser in NodeJS? how do you do that?

@BuyMyBeard
Copy link
Author

BuyMyBeard commented Nov 26, 2024

@BuyMyBeard Could you try version 1.6.0? It seems to be working in that version.

I have tried making a repro with [email protected] but it couldn't compile because it wasn't compatible with [email protected] and canvas @2.11.2.

How'd you get it to work in that version? I could revert the version of canvas and jsdom but I dont want to have to compile the cairo backend on my windows machine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants