Open almcken opened 4 years ago
That would be awesome! Thanks for your work on this lib. đź‘Ť
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…
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);
}
Hello. I think it would be a nice feature to able to generate a PNG image.