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

Convert to JPEG or PNG #5

Open
jdnichollsc opened this issue Nov 10, 2016 · 2 comments
Open

Convert to JPEG or PNG #5

jdnichollsc opened this issue Nov 10, 2016 · 2 comments

Comments

@jdnichollsc
Copy link

Hi guys,

Is possible to export the QR code like JPEG or PNG format?

Thanks in advance, Nicholls

@zenozeng
Copy link
Owner

Sorry, it's not supported yet, maybe you can use graphicsmagick to convert the output gif?

@jdnichollsc
Copy link
Author

jdnichollsc commented Nov 10, 2016

Hi my friend, thanks for your quickly response!

I'm getting the following error

var code = "123";
var base64 = qrcode(code || "", {
  size: 200
});
gm(new Buffer(base64, 'base64'), 'qrcode.gif')
.toBuffer('png',function (err, base64) {
   //err => [Error: Stream yields empty buffer]
});

What do you think about that?

Thanks in advance, Nicholls

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