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

Add support to generate PNG Image #84

Open
almcken opened this issue Mar 17, 2020 · 3 comments
Open

Add support to generate PNG Image #84

almcken opened this issue Mar 17, 2020 · 3 comments

Comments

@almcken
Copy link

almcken commented Mar 17, 2020

Hello. I think it would be a nice feature to able to generate a PNG image.

@mghignet
Copy link

That would be awesome!
Thanks for your work on this lib. 👍

@ygoe
Copy link

ygoe commented Aug 22, 2020

If you're using the JavaScript library and you're okay with using an HTML5 <canvas> for that, you can do that with the renderTo2dContext function. See my new sample page in PR #91. Direct generation of the PNG binary data is another thing…

@JBES
Copy link

JBES commented Jan 25, 2021

PHP: qrcode.php

static function createPNG($text='',$filename='',$size,$margin,$ec=QR_ERROR_CORRECT_LEVEL_L){
$qr=QRCode::getMinimumQRCode($text,$ec);
$im=$qr->createImage($size,$margin);
imagepng($im,$filename);
imagedestroy($im);
}

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

4 participants